how can i set character buffering on stdout so that print('foo',end='')
immediately outputs "foo" without a newline?
Perhaps use -u option or set the PYTHONUNBUFFERED environment variable?
-u says the text I/O layer will still be line-buffered, in the man page, and that PYTHONUNBUFFERED is equivalent to -u. i want to get unbuffered. does that meant i must use binary mode?