updated all print calls to use print() method for 2/3
This commit is contained in:
parent
e58cbe9421
commit
feebd8704f
11 changed files with 89 additions and 95 deletions
|
@ -55,9 +55,9 @@ def example(options):
|
|||
def main():
|
||||
options = parser.parse_options("emane80211")
|
||||
start = datetime.datetime.now()
|
||||
print "running emane 80211 example: nodes(%s) time(%s)" % (options.nodes, options.time)
|
||||
print("running emane 80211 example: nodes(%s) time(%s)" % (options.nodes, options.time))
|
||||
example(options)
|
||||
print "elapsed time: %s" % (datetime.datetime.now() - start)
|
||||
print("elapsed time: %s" % (datetime.datetime.now() - start))
|
||||
|
||||
|
||||
if __name__ == "__main__" or __name__ == "__builtin__":
|
||||
|
|
|
@ -44,10 +44,10 @@ def example(options):
|
|||
first_node = session.get_node(2)
|
||||
last_node = session.get_node(options.nodes + 1)
|
||||
|
||||
print "starting iperf server on node: %s" % first_node.name
|
||||
print("starting iperf server on node: %s" % first_node.name)
|
||||
first_node.cmd(["iperf", "-s", "-D"])
|
||||
first_node_address = prefixes.ip4_address(first_node)
|
||||
print "node %s connecting to %s" % (last_node.name, first_node_address)
|
||||
print("node %s connecting to %s" % (last_node.name, first_node_address))
|
||||
last_node.client.icmd(["iperf", "-t", str(options.time), "-c", first_node_address])
|
||||
first_node.cmd(["killall", "-9", "iperf"])
|
||||
|
||||
|
@ -59,9 +59,9 @@ def main():
|
|||
options = parser.parse_options("switch")
|
||||
|
||||
start = datetime.datetime.now()
|
||||
print "running switch example: nodes(%s) time(%s)" % (options.nodes, options.time)
|
||||
print("running switch example: nodes(%s) time(%s)" % (options.nodes, options.time))
|
||||
example(options)
|
||||
print "elapsed time: %s" % (datetime.datetime.now() - start)
|
||||
print("elapsed time: %s" % (datetime.datetime.now() - start))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -48,10 +48,10 @@ def example(options):
|
|||
first_node = session.get_node(2)
|
||||
last_node = session.get_node(options.nodes + 1)
|
||||
|
||||
print "starting iperf server on node: %s" % first_node.name
|
||||
print("starting iperf server on node: %s" % first_node.name)
|
||||
first_node.cmd(["iperf", "-s", "-D"])
|
||||
address = prefixes.ip4_address(first_node)
|
||||
print "node %s connecting to %s" % (last_node.name, address)
|
||||
print("node %s connecting to %s" % (last_node.name, address))
|
||||
last_node.client.icmd(["iperf", "-t", str(options.time), "-c", address])
|
||||
first_node.cmd(["killall", "-9", "iperf"])
|
||||
|
||||
|
@ -63,9 +63,9 @@ def main():
|
|||
options = parser.parse_options("wlan")
|
||||
|
||||
start = datetime.datetime.now()
|
||||
print "running wlan example: nodes(%s) time(%s)" % (options.nodes, options.time)
|
||||
print("running wlan example: nodes(%s) time(%s)" % (options.nodes, options.time))
|
||||
example(options)
|
||||
print "elapsed time: %s" % (datetime.datetime.now() - start)
|
||||
print("elapsed time: %s" % (datetime.datetime.now() - start))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue