log_mhz19.py: flush print
authorgregor herrmann <gregor@toastfreeware.priv.at>
Thu, 22 Oct 2020 18:54:41 +0000 (20:54 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Thu, 22 Oct 2020 18:54:41 +0000 (20:54 +0200)
Otherwise redirecting stdout doesn't work.

log_mhz19.py

index 18ffb11f781c91c46f2963c3161a65f812cc7280..e99ceaef8adba343981fb7124eecc3ed5cc85b7d 100755 (executable)
@@ -28,7 +28,7 @@ class Receiver(asyncio.Protocol):
 
     def data_received(self, data):
         data = data.decode()
-        print(data, end='')
+        print(data, end='', flush=True)
 
     def connection_lost(self, exc):
         log.debug('port closed')