systematic use of context managers for dealing with files instead of open()/close...
[nepi.git] / examples / omf / nitos_omf6_vlc.py
index eb615fe..c6c2600 100644 (file)
@@ -163,9 +163,8 @@ print("BYTES transmitted", byte_count)
 ## If you redirected the video to standard output, you can try to 
 ## retrieve the stdout of the VLC client
 ## video = ec.trace(app2, "stdout")
-#f = open("video.ts", "w")
-#f.write(video)
-#f.close()
+#with open("video.ts", "w") as f:
+#    f.write(video)
 
 # Stop Experiment
 ec.shutdown()