turning a python script to windows service
Mark Hammond
mhammond at skippinet.com.au
Tue Mar 26 01:26:41 EST 2002
kedai wrote:
> hi
> i've a simple script that just prints time.time(). how can i turn it
> to a windows service?
>
> do i need to do anythng special, apart from subclassing from
> win32serviceutil.ServiceFramework and defining SvcDoRun, SvcStop, etc.
> (the o'reilly python for win32 does help a bit, but i think i need
> more prodding :P)
>
> i have turned the sript to run as a service with srvany, but it never
> prints anything, or do anything useful. but when run in debug mode,
> it does print.
When run as a service, the print statements go nowhere useful - they run
in the background. Try looking up info in win32traceutil - this will
allow you to see your print statement when running as a service.
Mark.
More information about the Python-list
mailing list