I'm trying to port some python code that uses the Popen3 class returned from popen2.popen3 on linux.  This isn't available on windows, so I thought I'd try it using win32process.

I figured out a way to call win32process.CreateProcess that actually spawns a process, but calling win32process.TerminateProcess on the handle it returns fails with 'Access Denied'.

What would be the typical way someone would spawn a process and later kill it?

Sample Code:
import win32process
si = win32process.STARTUP_INFO()
details = win32process.CreateProcess('foo.exe','foo.exe',None,None,False,0,None,None,si)
win32process.TerminateProcess(details[0],99)

_______________________________________________
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

Reply via email to