CommanderPi icon indicating copy to clipboard operation
CommanderPi copied to clipboard

logging runs in buffered mode on python3.7

Open wjgeorge opened this issue 3 years ago • 0 comments

apparently a small chnage in python3.7, stderr is buffered so output to logfile will only happen when the buffer is full. These two command will perform differntly

sudo python3 ${HOME}/CommanderPi/src/main.py ${HOME}

vs

sudo python3 ${HOME}/CommanderPi/src/main.py ${HOME} > logfile.txt

See:

https://stackoverflow.com/questions/22471023/python-sys-stderr-flush-frequency

wjgeorge avatar Jun 01 '21 10:06 wjgeorge