X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=examples%2Flinux%2Fvlc_streaming.py;h=9f31286e6b30576c8f02af5748fddc90ef1a3cbc;hb=58a2b493f8df1072a1faa653c8abb6a3f9ba21fa;hp=3533e018f259216329ccbb35569d32bbdad66a26;hpb=e55924b6886bd7382a28e1ae235c4810f852e163;p=nepi.git diff --git a/examples/linux/vlc_streaming.py b/examples/linux/vlc_streaming.py index 3533e018..9f31286e 100644 --- a/examples/linux/vlc_streaming.py +++ b/examples/linux/vlc_streaming.py @@ -21,6 +21,8 @@ # $ cd # python examples/linux/vlc_streaming.py -a -b -u -i +from __future__ import print_function + from nepi.execution.ec import ExperimentController from nepi.execution.resource import ResourceState, ResourceAction @@ -114,11 +116,10 @@ ec.deploy() ec.wait_finished([server]) video = ec.trace(client, "VIDEO") -f = open("video.ts", "w") -f.write(video) -f.close() +with open("video.ts", "w") as f: + f.write(video) ec.shutdown() -print "Streamed VIDEO stored localy at video.ts" +print("Streamed VIDEO stored localy at video.ts")