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
+3 -1
View File
@@ -8,6 +8,8 @@ but it exposes the configuration details and allows customization.
For most tasks, the higher-level API will be preferable.
"""
from __future__ import print_function
from mininet.net import Mininet
from mininet.node import Node
from mininet.link import Link
@@ -40,7 +42,7 @@ def scratchNet( cname='controller', cargs='-v ptcp:' ):
switch.cmd( 'ovs-vsctl del-br dp0' )
switch.cmd( 'ovs-vsctl add-br dp0' )
for intf in switch.intfs.values():
print switch.cmd( 'ovs-vsctl add-port dp0 %s' % intf )
print( switch.cmd( 'ovs-vsctl add-port dp0 %s' % intf ) )
# Note: controller and switch are in root namespace, and we
# can connect via loopback interface