[python-win32] Simple service...

fmml at cedval.org fmml at cedval.org
Fri Sep 3 19:40:24 CEST 2004


Hi all,

I have a script which has a main routine that wakes up every 30 minutes,
performs a few things and go back to sleep.

I would like to make my script a service. So I wrote a second script that
imports modules from the first one.

In my code I have the SVCDoRun routine were I run my "my_main()" script
main loop and it does work, but can't stop the service from the service
manager.

Goes like this:

def SvcDoRun(self):
    win32event.WaitForSingleObject(self.hWaitStop, win32event.INFINITE)

    while 1:
        my_main()


How can I run my script while waiting for the "stop service" signal?


Any ideas?


Thanks in advance,

Francois






More information about the Python-win32 mailing list