making a Windows NT service out of a python program
Mark Hammond
MHammond at skippinet.com.au
Tue Jul 13 23:07:02 EDT 1999
Bill Tutt wrote in message
<4D0A23B3F74DD111ACCD00805F31D8100DB90F2E at RED-MSG-50>...
>
>> >The worst thing about them is that they can be tricky to
>> debug. If they
>> >are running in the system account then they have a restricted
>> >environment and the standard output channels send useful data to
>>
>> he he - not with Python :-) Just import win32traceutil at
>> the top of your
>> service, and you can see all your print statements in Pythonwin :-)
Also, I meant to mention that Python services have a built-in "debug" mode,
where the service simply runs under Python.exe - this can be very handy, and
I use this most of the time when developing.
>Heck, if you give it permission to interact with the desktop, you might
>actually be able to use Mark's cool GUI debugger. :) (No I haven't tried
>this...)
Actually, I know someone who has. Theoretically, it will work as long as
you restrict the debugging to a single thread. The Pythonwin debugger is
not thread friendly (although I have been thinking about that, and decided
it could be. Other alternative would be to build a "remote debugger"
interface, so you always could debug, regardless of desktop interaction -
dunno which way I will go (probably the former for now), but it wont be for
a while (or until I personally _really_ need it :)
Mark.
More information about the Python-list
mailing list