[Twisted-Python] Twisted and NT Services

Andrew Bennetts andrew-twisted at puzzling.org
Mon Jun 23 22:54:32 EDT 2003


On Tue, Jun 24, 2003 at 11:31:53AM +1000, screwtape at froup.com wrote:
[...]
> Also, I've gotten into the habit of using py2exe to turn scripts into
> standalone Win32 programs, and it would be really nice to be able to
> ship a standalone NT service. Unfortunately, there seems to be a "pick
> any two" relationship between Twisted, NT Services, and py2exe - when
> I try and combine all three, I get the following traceback inside my
> Application.run() call:
> 
>       File "twisted\internet\app.pyc", line 861, in run
>     --- <exception caught here> ---
>       File "twisted\python\log.pyc", line 64, in callWithLogger
>       File "twisted\python\log.pyc", line 51, in callWithContext
>       File "twisted\python\context.pyc", line 32, in callWithContext
>       File "twisted\internet\default.pyc", line 122, in run
>       File "twisted\internet\default.pyc", line 116, in startRunning
>       File "twisted\internet\default.pyc", line 88, in _handleSignals
>     exceptions.ValueError: signal only works in main thread

Try passing installSignalHandlers=0 to Application.run to work around this.

-Andrew.





More information about the Twisted-Python mailing list