Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5778 > unrolled thread
| Started by | Miki Tebeka <miki.tebeka@gmail.com> |
|---|---|
| First post | 2011-05-19 09:05 -0700 |
| Last post | 2011-05-20 23:19 +0800 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
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
| From | Miki Tebeka <miki.tebeka@gmail.com> |
|---|---|
| Date | 2011-05-19 09:05 -0700 |
| Subject | Re: 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]
| From | TheSaint <nobody@nowhere.net.no> |
|---|---|
| Date | 2011-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