Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5778 > unrolled thread

Re: how to get PID from subprocess library

Started byMiki Tebeka <miki.tebeka@gmail.com>
First post2011-05-19 09:05 -0700
Last post2011-05-20 23:19 +0800
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Re: how to get PID from subprocess library Miki Tebeka <miki.tebeka@gmail.com> - 2011-05-19 09:05 -0700
    Re: how to get PID from subprocess library TheSaint <nobody@nowhere.net.no> - 2011-05-20 23:19 +0800

#5778 — Re: how to get PID from subprocess library

FromMiki Tebeka <miki.tebeka@gmail.com>
Date2011-05-19 09:05 -0700
SubjectRe: how to get PID from subprocess library
Message-ID<f1d62b97-999b-472a-991c-6b6015b60d11@glegroupsg2000goo.googlegroups.com>
The best module for doing such things is subprocess. And the Popen object has a pid attribute (http://docs.python.org/library/subprocess.html#subprocess.Popen.pid)

[toc] | [next] | [standalone]


#5855

FromTheSaint <nobody@nowhere.net.no>
Date2011-05-20 23:19 +0800
Message-ID<ir60qf$gra$1@speranza.aioe.org>
In reply to#5778
Miki Tebeka wrote:

> The best module for doing such things is subprocess. And the Popen object
> has a pid attribute

I knew that, it's my fault that I'm not good to manage with popen. I found 
simplier to use subprocess.getstatusoutput. Maybe this function doesn't 
return the child pid, so I should adopt to work with Popen :(

-- 
goto /dev/null

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web