How can I obtain the process id for a program launched via os.system (theProgram) ? I would like to do this portability (Unix, Windows). Presently on Unix, I'm getting the pid by parsing the output from: "ps -ef | grep theProgram" but that seems messy and unreliable since "theProgram" may be truncated in the output from ps.