From 4af606227a7ad9887bf2bb393b98d1099e5105bf Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Sun, 24 Jan 2016 15:47:08 +1100 Subject: flush after print(). so that |tee will display it. --- example-scripts/control-server/generate-cut-list.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'example-scripts/control-server/generate-cut-list.py') diff --git a/example-scripts/control-server/generate-cut-list.py b/example-scripts/control-server/generate-cut-list.py index 305ef83..59519c1 100755 --- a/example-scripts/control-server/generate-cut-list.py +++ b/example-scripts/control-server/generate-cut-list.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 import socket import datetime +import sys host = 'localhost' port = 9999 @@ -17,3 +18,4 @@ for line in fd: if signal == 'message' and args[0] == 'cut': ts = datetime.datetime.now().strftime("%Y-%m-%d/%H_%M_%S") print(ts) + sys.stdout.flush() -- cgit v1.2.3