Daniel Crespo wrote: >> >>> os.spawnl(os.P_NOWAIT, "c:/windows/notepad.exe") >> 1944 > > I don't get the correct PID. > > When I do os.spawnl(os.P_NOWAIT, "c:/windows/notepad.exe") > I get 168 (for example), while in the tasklist appears notepad.exe with > the 2476 PID. > > Why?
not sure, but the return value looks like a PID, so maybe you're seeing the PID for the cmd.exe instance used to run the program. or something. try this instead: >>> import subprocess >>> p = subprocess.Popen("c:/windows/notepad.exe") >>> p.pid 1948 </F> -- http://mail.python.org/mailman/listinfo/python-list