[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-04-02 Thread Georg Brandl
Georg Brandl added the comment: I've fixed the using/cmdline and manpage to describe the current behavior. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Use : ... print(i, end=' ') ... sys.stdout.flush() ... time.sleep(1) -- ___ Python tracker ___

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread Noam Yorav-Raphael
Noam Yorav-Raphael added the comment: I can call flush() after the user code was executed, but a code like this: >>> for i in range(10): ... print(i, end=' ') ... time.sleep(1) will show the numbers only after 10 seconds, while I would like a number printed every second. I now see tha

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't quite see the point in having the streams buffered in one > level and unbuffered in another, but I guess there's a reason. The reason is simply that it wasn't implemented. Unbuffered I/O isn't useful very often. > Anyway, how can I make those streams

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread Noam Yorav-Raphael
Noam Yorav-Raphael added the comment: I typed "man python3" on ubuntu 9.10 and nothing was explained about that - I now checked and found out that it displayed the python2 man page. I don't know where to find the Python 3 man page. I don't quite see the point in having the streams buffered in

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> georg.brandl components: +Documentation -IO nosy: +georg.brandl ___ Python tracker ___ ___

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: In the current state of affaires this is more of a documentation issue. Python 3 doesn't support totally unbuffered text I/O (and standard streams are open in text mode). What `-u` and PYTHONUNBUFFERED do is that the binary layer of standard streams is unbuff

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread STINNER Victor
STINNER Victor added the comment: -u is not ignored, but use line buffering: see issue #4705 and commit r68977. -- nosy: +haypo ___ Python tracker ___ ___

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread Noam Yorav-Raphael
New submission from Noam Yorav-Raphael : Hello, Python 3.1 ignored the PYTHONUNBUFFERED environment variable and the '-u' switch (which do the same thing): stdout remains buffered even when the flag is raised. To reproduce, run: > python3 -u -c 'import time, sys; sys.stdout.write("a"); time.s