[New-bugs-announce] [issue4390] Using subprocess.STDOUT causes AttributeError

Krzysztof Pawlik report at bugs.python.org
Sat Nov 22 21:28:04 CET 2008


New submission from Krzysztof Pawlik <krzysiek.pawlik at people.pl>:

Using stderr=subprocess.STDOUT causes Python 3.0 (RC1 from Ubuntu 8.10)
to raise AttributeError, important code snippet (whole test program
attached):

proc = subprocess.Popen(['whoami'], stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
stdout, stderr = proc.communicate()


nelchael at nelchael-vbox ~$ python2.5 --version
Python 2.5.2
nelchael at nelchael-vbox ~$ python2.5 test-subprocess.py
('stdout:', 'nelchael\n')
('stderr:', None)
nelchael at nelchael-vbox ~$ python3 --version
Python 3.0rc1+
nelchael at nelchael-vbox ~$ python3 test-subprocess.py
Traceback (most recent call last):
  File "test-subprocess.py", line 4, in <module>
    stdout, stderr = proc.communicate()
  File "/usr/lib/python3.0/subprocess.py", line 663, in communicate
    stdout = self._fo_read_no_intr(self.stdout)
AttributeError: 'Popen' object has no attribute '_fo_read_no_intr'
nelchael at nelchael-vbox ~$

----------
components: Library (Lib)
files: test-subprocess.py
messages: 76258
nosy: nelchael
severity: normal
status: open
title: Using subprocess.STDOUT causes AttributeError
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file12106/test-subprocess.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4390>
_______________________________________


More information about the New-bugs-announce mailing list