Executing a hidden/background program

imageguy imageguy1206 at gmail.com
Mon Nov 3 16:13:00 CET 2008

On Nov 2, 6:32 am, jim3... at googlemail.com wrote:
> On Nov 2, 3:59 am, "Mike Driscoll" <kyoso... at gmail.com> wrote:
> > You probably want to create a Windows service with Python. There are
> > various ways to accomplish this.
> Was considering a Windows service too, however would like to avoid
> that as non-Admin users may not be able to do that. While I'm not
> familiar with threading, I'm considering starting a seperate thread
> and use a function such as os.pexec that hangs until the external
> daemon .exe exists.

Check out the wx.lib.delayedresults option in the demo.

Since wx.App needs to run as the main thread, you might be able to run
your as the 'delayedresult'.  As for the main frame of your app,
simply Hide()/Show() when it needs to be visible.  When the wx.App
closes, the thread running the service will automatically shut down.

Other than that ... I think it is a bit more complicated and will
probably require asyncore and/or asynchat.

More information about the Python-list mailing list