# BASH command -> ' ccndstart ; ccndc add ccnx:/ udp host ; ccnr '
command = "ccndstart && "
- peers = map(lambda peer: "ccndc add ccnx:/ udp %s" % peer, peers)
+ peers = ["ccndc add ccnx:/ udp %s" % peer for peer in peers]
command += " ; ".join(peers) + " && "
command += " ccnr & "
ec.wait_finished(apps)
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)
# Shutdown the experiment controller
ec.shutdown()