How to pass the focus on python application

T

titouille

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 :
----------
winXP


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
FlashXmlSocket.

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
subject


Thierry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top