the "-u" argument
Martin von Loewis
loewis at informatik.hu-berlin.de
Sun Oct 21 15:35:31 CEST 2001
Felix <bfg10k at 21cn.com> writes:
> when i use "python -u" to start the interpreter, every time i hit "ENTER"
> the interpreter always produce an error message like below.
> File "<stdin>", line 1
> SyntaxError: invalid syntax
> but i didn't type any statement (thus there can't be any SyntaxError).
> does anybody know why this happens?
My guess is this is because of the CR character that is send as part
of the CRLF sequence. Without -u, the C library translates CRLF to LF,
which is acceptable; if the CR remains, it is an error.
More information about the Python-list