By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

How to pass the focus on python application

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.