Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 611a710

Browse files
committed
Patch #552812: Better description in "python -h" for -u.
1 parent 75d2d94 commit 611a710

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Misc/python.man

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ indentation in a way that makes it depend on the worth of a tab
138138
expressed in spaces. Issue an error when the option is given twice.
139139
.TP
140140
.B \-u
141-
Force stdin, stdout and stderr to be totally unbuffered.
141+
Force stdin, stdout and stderr to be totally unbuffered. Note that
142+
there is internal buffering in xreadlines(), readlines() and file-object
143+
iterators ("for line in sys.stdin") which is not influenced by this
144+
option. To work around this, you will want to use "sys.stdin.readline()"
145+
inside a "while 1:" loop.
142146
.TP
143147
.B \-v
144148
Print a message each time a module is initialized, showing the place

Modules/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static char *usage_2 = "\
6262
-S : don't imply 'import site' on initialization\n\
6363
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
6464
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
65+
see man page for details on internal buffering relating to "-u"\n\
6566
";
6667
static char *usage_3 = "\
6768
-v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\

0 commit comments

Comments
 (0)