New submission from Matt Joiner <anacro...@gmail.com>:

>>> a = subprocess.Popen(['cat', '/path/to/text.ini'], stdout=subprocess.PIPE, 
>>> universal_newlines=True)
>>> b = configparser.ConfigParser()
>>> b.read_file(a.stdout)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/hostname/sig/local/lib/python3.2/configparser.py", line 708, in 
read_file
    self._read(f, source)
  File "/hostname/sig/local/lib/python3.2/configparser.py", line 994, in _read
    for lineno, line in enumerate(fp, start=1):
AttributeError: '_io.FileIO' object has no attribute 'read1'

Also this fails without universal_readlines, which is not so bad except that 
the name 'read_file' doesn't exactly indicate this.

I found one mildly related bug: http://bugs.python.org/issue11670

----------
components: IO, Interpreter Core, Library (Lib)
messages: 140720
nosy: anacrolix
priority: normal
severity: normal
status: open
title: configparser can't read_file the output of subprocess.Popen
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to