Convert to integer for Python 3
Flush the stream after writing a char