Title: Popen3 objects don't have the pid attribute
Type: crash Severity: normal
Components: Documentation Versions: Jython 2.5
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amak, cheeming, fwierzbicki, jszakmeister, pjenvey
Priority: low Keywords:

Created on 2008-07-17.12:35:26 by cheeming, last changed 2013-02-27.01:57:01 by fwierzbicki.

msg3345 (view) Author: Chew Chee Ming (cheeming) Date: 2008-07-17.12:35:25
I have the following code:

    proc = popen2.Popen3(cmdline, capturestderr=True)
    pid =

And I get the following error:
AttributeError: 'instance' object has no attribute 'pid'
msg3868 (view) Author: John Szakmeister (jszakmeister) Date: 2008-12-03.11:19:29
Looks like the reason the 'pid' attribute isn't there is because it
isn't really accessible from Java.  We simply get a process object back
(which is stored in the 'process' attribute).  Looks like there's been a
couple of tickets regarding this for years now:;jsessionid=fc8c4da1d443b34328c733669efc4?bug_id=4244896

Maybe we can do this through jna instead?  That's probably just a
difficult due to the file streams.
msg4837 (view) Author: Philip Jenvey (pjenvey) Date: 2009-06-21.21:55:11
We can't really support this, but I'll leave it open until we document 
this fact somewhere
msg7789 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-26.17:14:28
Alan, this one will be fixed with the other pid bug right?
msg7821 (view) Author: Alan Kennedy (amak) Date: 2013-02-26.23:06:10
1. Unfortunately not. The os.getpid() fix only applies to the os function (which we get from jnr). This is about the process ID of the child process. jszakmeisters links have more detail. pjenveys comment is correct.

2. The popen2 module is deprecated, in favour of the subprocess module, which we encouraging people to switch to.

Close as "out of date"?
msg7828 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-27.01:56:08
Works for me. Closing.
msg7829 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-27.01:57:00
Just to avoid confusion, I meant Alan's suggestion to close as out of date works for me, not that the pid "works for me" :) -- closed as out of date.
Date User Action Args
2013-02-27 01:57:01fwierzbickisetmessages: + msg7829
2013-02-27 01:56:08fwierzbickisetstatus: open -> closed
resolution: out of date
messages: + msg7828
2013-02-26 23:06:10amaksetmessages: + msg7821
2013-02-26 17:14:28fwierzbickisetnosy: + fwierzbicki, amak
messages: + msg7789
versions: + Jython 2.5, - 2.5alpha1
2009-06-21 21:55:11pjenveysetnosy: + pjenvey
messages: + msg4837
components: + Documentation, - Core
2009-03-14 02:38:22fwierzbickisetpriority: low
2008-12-03 11:19:30jszakmeistersetnosy: + jszakmeister
messages: + msg3868
2008-07-17 12:35:26cheemingcreate