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, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to