[Python-bugs-list] [ python-Bugs-526382 ] raw_input does not flush stdout

noreply@sourceforge.net noreply@sourceforge.net
Wed, 06 Mar 2002 05:37:20 -0800


Bugs item #526382, was opened at 2002-03-06 22:34
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=526382&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
>Priority: 9
Submitted By: Jonathan Gardner (jgardn)
Assigned to: Nobody/Anonymous (nobody)
Summary: raw_input does not flush stdout

Initial Comment:
I know this has been talked about before. I am curious as to why it has 
not been fixed.

raw_input does not flush stdout before reading from stdin. This is a 
problem because if stdin and stdout are not terminals, then stdout will 
not be flushed, and the "user" will not know when he is being prompted.

Of course, I can use -u at the command line for python, but I don't want 
everything flushed every time stdout is written to. I only want it flushed 
when it is waiting for input. There is the potential for a large amount of 
data to be transmitted, and flushing everything can slow it way down. 
(Imagine 1000's of print statements, all flushing after they are done. 
Silly, isn't it?)






----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=526382&group_id=5470