[python-win32] python win-32, 64-bits, and services
Tim Roberts
timr at probo.com
Tue May 12 23:00:30 CEST 2009
Chris Curvey wrote:
> I'm attempting to wrap up a Python program and turn it into a service,
> using the method listed in Mark Hammond's book (*not* using py2exe).
> The program spawns a bunch of threads using the "subprocess" module.
The "subprocess" module does not create threads. It creates processes.
Processes in Windows run in separate address spaces, with separate file
handles.
> If I run the program from the command line, everything works fine. If
> I run it as a service, any kind of exception seems to stop the
> affected thread immediately. Exceptions are not bubbling up to the
> relevant try/except block.
How do you know this? Remember that the stdout and stderr files for
processes are not related to the originating process (unless you created
pipes), so if your try/except is printing a message, it's going into
empty space.
> Anyone have any ideas? I'll try to put together a succinct test case
> that I can share.
I would be interested in looking at it.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list