print -> info; end the horror of print vs. print()

Although we could use print() from __future__, this messes
up scripts which use examples as modules.

The simple, if not nicest for 2.7, solution is to use
info(), output() and other mininet.log functions. The disadvantage
is that we may have to adjust things if we change info() to
add automatic newlines, but we can burn that bridge in Mininet
3.x.
This commit is contained in:
Bob Lantz
2016-08-23 01:54:54 -07:00
parent 1eb6f65e40
commit ee15ce2243
18 changed files with 128 additions and 132 deletions
+3 -3
View File
@@ -66,13 +66,13 @@ def testPortNumbering():
'is actually on port', s1.ports[intfs], '... ' )
if validatePort( s1, intfs ):
info( 'Validated.\n' )
print( '\n' )
info( '\n' )
# test the network with pingall
net.pingAll()
print( '\n' )
info( '\n' )
info( '*** Stopping network' )
info( '*** Stopping network\n' )
net.stop()
if __name__ == '__main__':