[issue4390] Using subprocess.STDOUT causes AttributeError

2008-11-22 Thread Krzysztof Pawlik

New submission from Krzysztof Pawlik <[EMAIL PROTECTED]>:

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()


[EMAIL PROTECTED] ~$ python2.5 --version
Python 2.5.2
[EMAIL PROTECTED] ~$ python2.5 test-subprocess.py
('stdout:', 'nelchael\n')
('stderr:', None)
[EMAIL PROTECTED] ~$ python3 --version
Python 3.0rc1+
[EMAIL PROTECTED] ~$ python3 test-subprocess.py
Traceback (most recent call last):
  File "test-subprocess.py", line 4, in 
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'
[EMAIL PROTECTED] ~$

--
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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4390>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1490929] urllib.retrieve's reporthook called with non-helpful value

2008-12-07 Thread Krzysztof Pawlik

Krzysztof Pawlik <[EMAIL PROTECTED]> added the comment:

Attached patch adds new argument: progresshook - it will be passed two
arguments: count of downloaded bytes and total file size (or -1 if it's
not available).

Introducing new argument instead of modifying reporthook maintains
backwards compatibility, also allows removal of reporthook at one point
in the future.

This patch is against r30 SVN tag.

--
keywords: +patch
nosy: +nelchael
Added file: http://bugs.python.org/file12271/progresshook.diff

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1490929>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com