X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=examples%2Flinux%2Fvlc_streaming.py;h=9f31286e6b30576c8f02af5748fddc90ef1a3cbc;hb=719bae09cce5093d96acdf4ec04658d37fea3337;hp=7ddd20e30fa7c5694957949f7076d6eff213d87e;hpb=d50ba1a08e541ded7a8b322493ebb1d0cc59c6ff;p=nepi.git diff --git a/examples/linux/vlc_streaming.py b/examples/linux/vlc_streaming.py index 7ddd20e3..9f31286e 100644 --- a/examples/linux/vlc_streaming.py +++ b/examples/linux/vlc_streaming.py @@ -3,9 +3,8 @@ # Copyright (C) 2014 INRIA # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,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 @@ -115,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")