win32 questions

Mark Hammond MarkH at ActiveState.com
Thu Aug 3 20:26:05 EDT 2000


"Thomas Thiele" <thiele at muc.das-werk.de> wrote in message
news:3989B18E.E25A13CE at muc.das-werk.de...
> I want to start a new process. And I use
win32process.CreateProcess().
>
> 1.) is there an (winNT) equivalent to unix' waidpid()?

Dunno.  If you meant "waitpid" and the semantics are as I guess, then
the process handle (not the PID) returned from CreateProcess can be
used with the win32event functions (eg,
win32event.WaitForSingleObject())

> 2.) I do something like that in my main class:
>
>     def StartProcess():
>         commandline = A.GetCommandLine()
>         .... = win32process.CreateProcess( ....., commandline,
.......)
>         #process could not be started here, because commandline is
not a
> valid command
>         #ok, it's clear and not the problem
>
> BUT: if I call StartProcess again, I'll get an mysterious
errormessage
> " pywintypes.api_error(6, 'CloseHandle', 'Die Zugriffsnummer ist
nicht
> definiert') "

Error 6 on English systems is literally "The handle is invalid."  It
is a little strange.

Can you send me a repro for this?

> class A:
>     .....
>     def GetCommandline():
>         if self. strng != "foo":    <- error
>             outstring = foopath + foocommad

I'm afraid I have no idea what you are asking or getting at here...

Mark.






More information about the Python-list mailing list