Closed espenbo closed 4 years ago
I added the flush after the callback has been called in HANobis.py so that output is flushed no matter what the callback is doing. You should then be able to output to a file or pipe without buffering delays.
When run as a service, it is always unbuffered as python3 is started in unbuffered (-u) mode
Hello I could not get the script to send output to a text file python3 HANdomo.py -f /dev/ttyUSB0 > test.txt
If you add in the script 'sys.stdout.flush()' it works.
---------- Orginal ----------------
----------- Endret ------------
Then it works to use python3 HANdomo.py -f /dev/ttyUSB0 > test.txt``