git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cosmetic
[nepi.git]
/
examples
/
planetlab
/
ccn_simple_transfer.py
diff --git
a/examples/planetlab/ccn_simple_transfer.py
b/examples/planetlab/ccn_simple_transfer.py
index
6ca7cff
..
fabbcbc
100644
(file)
--- a/
examples/planetlab/ccn_simple_transfer.py
+++ b/
examples/planetlab/ccn_simple_transfer.py
@@
-31,6
+31,8
@@
# 0 ------- network -------- 1
#
# 0 ------- network -------- 1
#
+from __future__ import print_function
+
from nepi.execution.ec import ExperimentController
from optparse import OptionParser, SUPPRESS_HELP
from nepi.execution.ec import ExperimentController
from optparse import OptionParser, SUPPRESS_HELP
@@
-158,11
+160,10
@@
ec.deploy()
ec.wait_finished([ccncat])
stdout = ec.trace(ccncat, "stdout")
ec.wait_finished([ccncat])
stdout = ec.trace(ccncat, "stdout")
-f = open("video.ts", "w")
-f.write(stdout)
-f.close()
+with open("video.ts", "w") as f:
+ f.write(stdout)
ec.shutdown()
ec.shutdown()
-print
"Transfered FILE stored localy at video.ts"
+print
("Transfered FILE stored localy at video.ts")