use print() - import print_function - should be fine for both py2 and py3
[nepi.git] / examples / ccn_emu_live / dce.py
index 7f490a4..79507b5 100644 (file)
@@ -17,6 +17,8 @@
 #
 # Author: Alina Quereilhac <alina.quereilhac@inria.fr>
 
+from __future__ import print_function
+
 from nepi.execution.ec import ExperimentController 
 from nepi.execution.runner import ExperimentRunner
 from nepi.util.netgraph import NetGraph, TopologyType
@@ -169,7 +171,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
 
@@ -211,7 +213,7 @@ if __name__ == '__main__':
             add_node_callback = add_dce_node, 
             add_edge_callback = add_dce_edge)
     
-    print "Results stored at", ec.exp_dir
+    print("Results stored at", ec.exp_dir)
 
     #### Retrieve the consumer to wait for ot to finish
     ccncat = ec.filter_resources("linux::ns3::dce::CCNCat")