aboutsummaryrefslogtreecommitdiff
path: root/example-scripts/control-server
diff options
context:
space:
mode:
Diffstat (limited to 'example-scripts/control-server')
-rwxr-xr-xexample-scripts/control-server/generate-cut-list.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/example-scripts/control-server/generate-cut-list.py b/example-scripts/control-server/generate-cut-list.py
index 959ab58..394865b 100755
--- a/example-scripts/control-server/generate-cut-list.py
+++ b/example-scripts/control-server/generate-cut-list.py
@@ -6,16 +6,16 @@ import sys
host = 'localhost'
port = 9999
-conn = socket.create_connection( (host, port) )
+conn = socket.create_connection((host, port))
fd = conn.makefile('rw')
for line in fd:
- words = line.rstrip('\n').split(' ')
+ words = line.rstrip('\n').split(' ')
- signal = words[0]
- args = words[1:]
+ signal = words[0]
+ args = words[1:]
- if signal == 'message' and args[0] == 'cut':
- ts = datetime.datetime.now().strftime("%Y-%m-%d/%H_%M_%S")
- print(ts)
- sys.stdout.flush()
+ if signal == 'message' and args[0] == 'cut':
+ ts = datetime.datetime.now().strftime("%Y-%m-%d/%H_%M_%S")
+ print(ts)
+ sys.stdout.flush()