use print() - import print_function - should be fine for both py2 and py3
[nepi.git] / examples / ccn_emu_live / planetlab.py
index c256b70..b2548f3 100644 (file)
@@ -1,13 +1,11 @@
 #!/usr/bin/env python
-
-###############################################################################
 #
 #    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 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
@@ -18,8 +16,8 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Author: Alina Quereilhac <alina.quereilhac@inria.fr>
-#
-###############################################################################
+
+from __future__ import print_function
 
 from nepi.execution.ec import ExperimentController 
 from nepi.execution.runner import ExperimentRunner
@@ -177,7 +175,7 @@ def avg_interests(ec, run):
     f = open("/tmp/metric", "a+")
     f.write("%.2f\n" % metric)
     f.close()
-    print " METRIC", metric
+    print(" METRIC", metric)
 
     return metric
 
@@ -208,7 +206,7 @@ if __name__ == '__main__':
             add_node_callback = add_pl_node, 
             add_edge_callback = add_pl_edge)
     
-    print "Results stored at", ec.exp_dir
+    print("Results stored at", ec.exp_dir)
 
     #### Retrieve the content producing resource to wait for ot to finish
     ccncat = ec.filter_resources("linux::CCNCat")