Use print function

This commit is contained in:
Brad Walker
2016-06-21 16:27:04 -07:00
committed by Bob Lantz
parent 57abd9baef
commit 70fcc45893
25 changed files with 189 additions and 141 deletions
+4 -2
View File
@@ -8,6 +8,8 @@ multiple hosts and monitor their output interactively for a period=
of time.
"""
from __future__ import print_function
from mininet.net import Mininet
from mininet.node import Node
from mininet.topo import SingleSwitchTopo
@@ -34,7 +36,7 @@ def startpings( host, targetips ):
' done; '
'done &' )
print ( '*** Host %s (%s) will be pinging ips: %s' %
print( '*** Host %s (%s) will be pinging ips: %s' %
( host.name, host.IP(), targetips ) )
host.cmd( cmd )
@@ -69,7 +71,7 @@ def multiping( netsize, chunksize, seconds):
readable = poller.poll(1000)
for fd, _mask in readable:
node = Node.outToNode[ fd ]
print '%s:' % node.name, node.monitor().strip()
print( '%s:' % node.name, node.monitor().strip() )
# Stop pings
for host in hosts: