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
+5 -2
View File
@@ -4,18 +4,21 @@
Example to create a Mininet topology and connect it to the internet via NAT
"""
from __future__ import print_function
from mininet.cli import CLI
from mininet.log import lg
from mininet.topolib import TreeNet
if __name__ == '__main__':
lg.setLogLevel( 'info')
net = TreeNet( depth=1, fanout=4 )
# Add NAT connectivity
net.addNAT().configDefault()
net.start()
print "*** Hosts are running and should have internet connectivity"
print "*** Type 'exit' or control-D to shut down network"
print( "*** Hosts are running and should have internet connectivity" )
print( "*** Type 'exit' or control-D to shut down network" )
CLI( net )
# Shut down NAT
net.stop()