cmd: flush stream in write_data().
authorW. Trevor King <wking@tremily.us>
Wed, 17 Oct 2012 18:30:02 +0000 (14:30 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 17 Oct 2012 18:30:02 +0000 (14:30 -0400)
doc/demo/cmd.py

index 6c476f1e31ea1ed41e5b53e6ac2724d96d0ea158..b2be0a3ebca8294a8e7d8a36dc2d52fd355c6bdb 100755 (executable)
@@ -90,6 +90,7 @@ def write_data(stream, channels, data, physical=False):
     for row in range(data.shape[0]):
         stream.write('\t'.join(str(x) for x in data[row,:]))
         stream.write('\n')
+    stream.flush()
 
 class DataWriter (object):
     def __init__(self, stream, channels, physical=False):