service windows avec py2exe
tjgolden at gmail.com
Sun Nov 12 15:35:57 CET 2006
> It's this line who crash the service :
> why this function goes when it is not a service?
> with IDLE -> ok
> with py2exe executable (no windows service) -> ok
> with py2exe service option true (windows service) -> CRASH....
OK. I think I can help here. WMI is a COM/DCOM-based technology.
Windows services are inherently multithreaded. Therefore you need to
Initialize a COM threading model specifically even though you're not
really using threads yourself.
somewhere before the line which instantiates the WMI
object (the one you quoted above).
I have no idea why this usually manifests itself as a
"Syntax Error" but it does!
More information about the Python-list