process id from os.system

Mark Hammond MarkH at ActiveState.com
Thu Jul 20 21:24:40 EDT 2000


"j vickroy" <jvickroy at sec.noaa.gov> wrote in message
news:3977482B.478D2754 at sec.noaa.gov...
> How can I obtain the process id for a program launched via
>
>   os.system (theProgram) ?
>
> I would like to do this portability (Unix, Windows).

AFAIK, there is no portable solution.  Using win32process.CreateProcess()
under Windows will return the PID (along with the process handle, which
can be used to wait for the process to terminate)

Mark.






More information about the Python-list mailing list