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

Discussion in 'Python' started by mikem76@gmail.com, Jun 7, 2006.

  1. Guest

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

    Mike
     
    , Jun 7, 2006
    #1
    1. Advertising

  2. Re: How do I get the process id when starting a process usingos.popen2 or os.popen3 on linux?

    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>
     
    Fredrik Lundh, Jun 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    479
    Donn Cave
    Jun 15, 2004
  2. Jeffrey Barish

    Bug in popen2.Popen3?

    Jeffrey Barish, Jun 16, 2004, in forum: Python
    Replies:
    1
    Views:
    353
    Donn Cave
    Jun 17, 2004
  3. Evgeni Sergeev
    Replies:
    2
    Views:
    442
    Jean Brouwers
    Dec 28, 2004
  4. alexrait1
    Replies:
    3
    Views:
    462
    Steven Bethard
    Mar 9, 2005
  5. Christoph Krammer

    Using os.popen3() to get binary data

    Christoph Krammer, Apr 6, 2007, in forum: Python
    Replies:
    4
    Views:
    363
Loading...

Share This Page