[python-win32] Multiple Windows Services

2009-01-22 Thread Nick Leaton
I have a need to write a service that can take multiple guises. So I would like one set of code, and to be able to install a dev service, a uat service, a test service etc. so something like python NickService.py -environment=DEV -config=c:\config\NickService.config for the install. This

Re: [python-win32] Multiple Windows Services

2009-01-22 Thread Harald Armin Massa
Nick, guess I had a similar problem. My solution was: [] cnf=oboxparm.readini() class oboxservice(win32serviceutil.ServiceFramework): _svc_name_=cnf.get(system,_svc_name_) _svc_display_name_ = cnf.get(system,_svc_display_name_) _svc_description_ =

Re: [python-win32] The GIL and COM

2009-01-22 Thread Brad Johnson
So one your thread has acquired the GIL, one of 3 things happens: * It returns quickly and the GIL is released. * It executes many many instructions: every 'n' instructions Python will temporarily release the GIL for you. * It calls some other blocking function. This other blocking

[python-win32] (no subject)

2009-01-22 Thread dan
I am writing a simple client and server that communicate using a duplex-mode named pipe on Windows. For my initial effort, the server used the Windows API calls to set up the pipe and communicate with it, but the client used the regular Python file methods. This works for exactly one

Re: [python-win32] (no subject)

2009-01-22 Thread Tim Roberts
d...@shragmir.com wrote: This is not the end of the world, because I can write the client application to use win32 API calls instead of the Python calls. But does anyone have any notion of why this is happening? I am hoping the answer may help me write clients in other applications (where I

Re: [python-win32] Duplex pipes issue (was (no subject))

2009-01-22 Thread dan
Thank you, Tim, That fixed it! (and apologies to the list for initially sending this with no subject). --Dan d...@shragmir.com wrote: This is not the end of the world, because I can write the client application to use win32 API calls instead of the Python calls. But does anyone have any

Re: [python-win32] GetWindowsVersion on Longhorn

2009-01-22 Thread Tim Roberts
Matt Herbert (matherbe) wrote: Just wondering if there is a way to differentiate Windows Server 2008 from Windows Vista? All the normal methods I would use aren't cutting it. For instance, sys.getwindowsversion() and platform.uname() are returning exactly the same thing for Vista and Windows

Re: [python-win32] The GIL and COM

2009-01-22 Thread Mark Hammond
On 23/01/2009 4:49 AM, Brad Johnson wrote: So one your thread has acquired the GIL, one of 3 things happens: * It returns quickly and the GIL is released. * It executes many many instructions: every 'n' instructions Python will temporarily release the GIL for you. * It calls some other blocking