473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Executing a hidden/background program

Using wxPython, I'm looking to build a GUI app for a daemon-based app,
on Win32 platform, how would I go about executing the daemon app so it
stays in the background when the Py app is running? It's critical that
the child process exit when the Py app exits/crashes.
Nov 1 '08 #1
3 2442
Jim,

On Sat, Nov 1, 2008 at 6:02 PM, <ji*****@googlemail.comwrote:
Using wxPython, I'm looking to build a GUI app for a daemon-based app,
on Win32 platform, how would I go about executing the daemon app so it
stays in the background when the Py app is running? It's critical that
the child process exit when the Py app exits/crashes.
--
http://mail.python.org/mailman/listinfo/python-list
You probably want to create a Windows service with Python. There are
various ways to accomplish this. While I haven't done it myself, I
found you some links:

http://agiletesting.blogspot.com/200...s-windows.html
http://essiene.blogspot.com/2005/04/...-services.html
http://timgolden.me.uk/python/wmi.html

Then the service can basically listen for input. You could probably do
something similar by creating a local server with cherrypy or some
such. I like the pubsub module for communication in wxPython.
Fortunately you can use it outside of the toolkit as well:

http://pypi.python.org/pypi/pubsub/1%20to%203

There's also a win32 mailing list for Python users. If you have
specific questions about creating a service, that's probably the best
place to ask. Here's a link to that as well:
http://mail.python.org/mailman/listinfo/python-win32

HTH

Mike
Nov 2 '08 #2
On Nov 2, 3:59*am, "Mike Driscoll" <kyoso...@gmail.comwrote:
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.
Nov 2 '08 #3
On Nov 2, 6:32*am, jim3...@googlemail.com wrote:
On Nov 2, 3:59*am, "Mike Driscoll" <kyoso...@gmail.comwrote:
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.
g.
Nov 3 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Kai Grossjohann | last post by:
I have a frame which is supposed to contain a list of links. The clickable area of each link comprises a picture followed by some text. I want the text to be cut at the right hand side when the...
0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
1
by: tabert | last post by:
I want to use JavaScript when a button is clicked to show and hide a SPAN or DIV. This works in both IE and Netscape, but what I'd like to happen is for there to be no white space where the hidden...
5
by: ZildjianB | last post by:
Hi All, I hope you can help me with this, as I have done some exhaustive searching over the past couple days and cannot find a solution. What I am trying to do is dynamically update an image...
15
by: Chakkaradeep | last post by:
Hi all, i have written a Service,now i want to execute another application (for eg;calc.exe) in the service....how will i perform it??... i tried using this.... /**************Executing a...
3
by: Rajesh | last post by:
Hello all, I have a problem here. I have a procedure called FillForm() where I populate values for some hidden asp:textboxes. But after I do a postback, my values in the textboxes are lost and I...
0
by: BasicQ | last post by:
I am running an executable from my aspx page with the click of a button. A date is passed as an argument. I am able to get the standardoutput from the Process(Exe) into the label of my page after...
8
by: lovecreatesbea... | last post by:
K&R 2, sec 2.4 says: If the variable in question is not automatic, the initialization is done once only, conceptually before the program starts executing, ... . "Non-automatic variables are...
2
by: esteuart | last post by:
I need to get the right combination for a div to clip any text inside and allow vertical alignment. I only have this problem in FireFox. I have 3 divs nested within each other. The outer div has...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.