[issue15532] for line in file is *still* broken in Python 2.7

2012-08-01 Thread Andy Lutomirski
New submission from Andy Lutomirski: This program: import subprocess, sys p = subprocess.Popen(['bash', '-c', 'while true; do echo x; sleep 1; done'], bufsize=0, stdout=subprocess.PIPE) for line in p.stdout: sys.stdout.buffer.write(line) sys.stdout.flush() sits around and does

[issue15532] for line in file is *still* broken in Python 2.7 on pipes

2012-08-01 Thread Andy Lutomirski
Changes by Andy Lutomirski l...@amacapital.net: -- title: for line in file is *still* broken in Python 2.7 - for line in file is *still* broken in Python 2.7 on pipes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15532

[issue15532] for line in file is *still* broken in Python 2.7 on pipes

2012-08-01 Thread Ned Deily
Ned Deily added the comment: Notice in the reply to Issue3907, with 2.6, you have to use io.open() explicitly. This is still true in Python 2.7, i.e. the new 3.x-compatible io library is not used by default in Python 2. If you want to use it with subprocess.Popen, one way is to supply a