How to pass the focus on python application
titi2027 at netplus.ch
Mon Apr 26 20:56:21 CEST 2004
Hi everybody !
first, sorry for my poor english, I'm french mothertongue ;)
Twisted Matrix 1.2.0
I explain my problem :
I try to build a multi-plateform python socket server to interact with
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 --
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
More information about the Python-list