[New-bugs-announce] [issue7461] os.popen() objects don't support the context manager protocol
Antoine Pitrou
report at bugs.python.org
Tue Dec 8 20:52:32 CET 2009
New submission from Antoine Pitrou <pitrou at free.fr>:
This works under trunk but fails under py3k:
>>> import os
>>> with os.popen("ls", "r") as f:
... print(f.read())
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: __exit__
----------
components: Library (Lib)
messages: 96151
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: os.popen() objects don't support the context manager protocol
type: behavior
versions: Python 3.1, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7461>
_______________________________________
More information about the New-bugs-announce
mailing list