If you need full control over the bytes written to the output, you can use sys.stdout
import sys
sys.stdout.write("Line 1 is ")
sys.stdout.write("big!\n")
If you do not output a new line ( \n), you need to explicitly call flush so that your data is not buffered like this:
sys.stdout.flush()
source
share