By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,220 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,220 IT Pros & Developers. It's quick & easy.

How do I get the process id when starting a process using os.popen2 or os.popen3 on linux?

P: n/a
Is there a way to get the process id when starting a process using
os.popen2 or os.popen3 on linux?

Mike

Jun 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
mi*****@gmail.com wrote:
Is there a way to get the process id when starting a process using
os.popen2 or os.popen3 on linux?


on Unix, os.popen2/popen3 uses functions and classes from the popen2
module. they return file objects attached to the process, but there's
no (non-hacky) way to get at the process itself.

if you need more control over the subprocess, you can use the classes in
the popen2 module, or, better, the subprocess module.

</F>

Jun 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.