I am noticed in some python code that -u is used to start the python interpreter.
I looked at the man page for python but I could not get much out of it. Please give me some examples.
I am noticed in some python code that -u is used to start the
Share
From
python --help:The manpage states:
Python opens the stdin, -out and -error streams in a buffered mode; it’ll read or write in larger chunks, keeping data in memory until a threshold is reached.
-udisables those buffers.Also, python can interpret newlines on open files and translate them from and to the native platform newlines (text mode). The
-uoption disables this translation, allowing you to process binary data without having to worry about what might happen to\r\ncombinations. It is the equivalent of usingrborwbmodes when opening files with theopen()function.