diff options
author | Carl Karsten <CFKarsten@gmail.com> | 2016-01-24 15:47:08 +1100 |
---|---|---|
committer | Carl Karsten <CFKarsten@gmail.com> | 2016-01-24 15:47:08 +1100 |
commit | 4af606227a7ad9887bf2bb393b98d1099e5105bf (patch) | |
tree | 087823afd43c397f2fcbeabe5f42979dece254e9 /example-scripts | |
parent | 0cb0f1f16320c4b0314c5b81c91f022330e74642 (diff) |
flush after print().
so that |tee will display it.
Diffstat (limited to 'example-scripts')
-rwxr-xr-x | example-scripts/control-server/generate-cut-list.py | 2 |
1 files changed, 2 insertions, 0 deletions
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() |