Windows Services

bonono at gmail.com bonono at gmail.com
Thu Dec 15 06:33:06 EST 2005


Steve Holden wrote:
> Mondal wrote:
> > Hi,
> >
> > Thanks to Peter, now I know how to control an *existing* Windows
> > service and how to run a *python script* as a Windows service. Although
> > these were really useful, my point was different.
> >
> > I have developed a script that monitors a specified folder for changes
> > in the files or folders within it. I converted that script to a stand
> > alone exe using py2exe. ***Now I would like to run that exe as a
> > Windows service***.
> >
> > I also intend to create an exe that will retrieve any information
> > stored by the file monitor mentioned above.
> >
> > Please tell me how do I go about it.
> >
> > Although I am a beginner in Python and Windows Services (Daemon), I am
> > a moderately experienced programmer.
> >
> I'm afraid that you can't just run any old executable as a Windows service.
>
> If something is going to be run as a service then it has to use the
> Windows service API so it responds correctly to being started and
> stopped, for example, and "pumps" the event queue from time to time.
>
I think there is some wrapper programs that can wrap around any console
window programs as service, either from cygwin or may be stand alone
too. Of course, the wrapped program would be stopped through some
"kill" signal rather than proper start/stop API calls.




More information about the Python-list mailing list