470,821 Members | 1,997 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,821 developers. It's quick & easy.

How to pass the focus on python application

Hi everybody !

first, sorry for my poor english, I'm french mothertongue ;)

technologies :
Python 2.3
Twisted Matrix 1.2.0
wxPython 2.5.1

platform :
I explain my problem :

I try to build a multi-plateform python socket server to interact with
flash animations.
Animations send by xmlSocket xml string, server intercept string,
parse it, execute method and return result as xml string to the

at beginning, xml sended string contains DOM document who describe one
or multiples operation(s) to execute. So final xml string (with return
results) contains already one or multiple return execution statements

When i use serveal methods like OpenFile or SaveFile, DialogBox
appears on the screen.

But it appear not on the top, because focus is on flash animation...
So if flash animation is for exemple in full-screen, user don't see
the opened dialog-box...

How to, on each platform (win, linux, mac), add a method to set the
focus on the server if it's required ??

for example, send xml contain method like this :

1. setFocusToServer ()
3. setNewWorkingDirectory (path)
2. OpenDialog (message, defaultDirectory, defaultFile, wildcard)

and add a --

setFocusToServer (self)

if wx.Platform == '__WXMAC__':
# code to focus server on mac when required

elif wx.Platform == '__WXMSW__':
# code to focus server on window when required

elif wx.Platform == '__WXGTK__ || wx.Platform == '__WXMOTIF__ :
# code to focus server on linux when required
-- method to focus application on each platform

many thanks in advance for your ideas, url and experience about this
Jul 18 '05 #1
0 1197

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by annagel | last post: by
1 post views Thread by colleen1980 | last post: by
1 post views Thread by massimo s. | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.