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 -3
View File
@@ -11,6 +11,7 @@ Example to pull custom params (topo, switch, etc.) from a file:
sudo mn --custom ~/mininet/custom/custom_example.py
"""
from __future__ import print_function
from optparse import OptionParser
import os
import sys
@@ -117,7 +118,7 @@ def addDictOption( opts, choicesDict, default, name, **kwargs ):
def version( *_args ):
"Print Mininet version and exit"
print "%s" % VERSION
print( "%s" % VERSION )
exit()
@@ -269,7 +270,7 @@ class MininetRunner( object ):
# set logging verbosity
if LEVELS[self.options.verbosity] > LEVELS['output']:
print ( '*** WARNING: selected verbosity level (%s) will hide CLI '
print( '*** WARNING: selected verbosity level (%s) will hide CLI '
'output!\n'
'Please restart Mininet with -v [debug, info, output].'
% self.options.verbosity )
@@ -331,7 +332,7 @@ class MininetRunner( object ):
inNamespace = self.options.innamespace
cluster = self.options.cluster
if inNamespace and cluster:
print "Please specify --innamespace OR --cluster"
print( "Please specify --innamespace OR --cluster" )
exit()
Net = MininetWithControlNet if inNamespace else Mininet
cli = ClusterCLI if cluster else CLI