[issue13202] subprocess __exit__ attribute missing

2011-10-17 Thread Éric Araujo
Éric Araujo added the comment: To clarify: Python 2.5 and higher support the with statement syntax, but not all classes that could benefit from it have the __enter__ and __exit__ methods. So you don’t get a SyntaxError in Python 2.7 when you write “with Popen(...)”, but you get an AttributeE

[issue13202] subprocess __exit__ attribute missing

2011-10-17 Thread Éric Araujo
Éric Araujo added the comment: Context management support was added in 3.2. It is not supported in 2.7. -- nosy: +eric.araujo ___ Python tracker ___ ___

[issue13202] subprocess __exit__ attribute missing

2011-10-17 Thread David W. Lambert
New submission from David W. Lambert : There are a number of issues with subprocess and __exit__ , 12494 status fixed among them. Program (which doesn't work as I had hoped, but that's not the issue): 'file p.py' import subprocess as S with S.Popen(('cat','-n',),shell=False,stdin=S.PIPE,st