Remove "from __future__ import print"
This was well-intentioned, but it causes more trouble than it's worth. Fixes #652
This commit is contained in:
@@ -11,7 +11,6 @@ Example to pull custom params (topo, switch, etc.) from a file:
|
|||||||
sudo mn --custom ~/mininet/custom/custom_example.py
|
sudo mn --custom ~/mininet/custom/custom_example.py
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
"This example doesn't use OpenFlow, but attempts to run sshd in a namespace."
|
"This example doesn't use OpenFlow, but attempts to run sshd in a namespace."
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from mininet.node import Host
|
from mininet.node import Host
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ Things to do:
|
|||||||
- hifi support (e.g. delay compensation)
|
- hifi support (e.g. delay compensation)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.node import Node, Host, OVSSwitch, Controller
|
from mininet.node import Node, Host, OVSSwitch, Controller
|
||||||
from mininet.link import Link, Intf
|
from mininet.link import Link, Intf
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ Note that one could also create a custom switch class and pass it into
|
|||||||
the Mininet() constructor.
|
the Mininet() constructor.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import Controller, OVSSwitch
|
from mininet.node import Controller, OVSSwitch
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
cpu.py: test iperf bandwidth for varying cpu limits
|
cpu.py: test iperf bandwidth for varying cpu limits
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import CPULimitedHost
|
from mininet.node import CPULimitedHost
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ of switches, this example demonstrates:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import UserSwitch, OVSKernelSwitch, Controller
|
from mininet.node import UserSwitch, OVSKernelSwitch, Controller
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ Additional routes may be added to the router or hosts by
|
|||||||
executing 'ip route' or 'route' commands on the router or hosts.
|
executing 'ip route' or 'route' commands on the router or hosts.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.topo import Topo
|
from mininet.topo import Topo
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ OpenFlow icon from https://www.opennetworking.org/
|
|||||||
|
|
||||||
MINIEDIT_VERSION = '2.2.0.1'
|
MINIEDIT_VERSION = '2.2.0.1'
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
# from Tkinter import *
|
# from Tkinter import *
|
||||||
from Tkinter import ( Frame, Label, LabelFrame, Entry, OptionMenu, Checkbutton,
|
from Tkinter import ( Frame, Label, LabelFrame, Entry, OptionMenu, Checkbutton,
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ to-do:
|
|||||||
- think about clearing last hop - why doesn't that work?
|
- think about clearing last hop - why doesn't that work?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import OVSSwitch
|
from mininet.node import OVSSwitch
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ multiple hosts and monitor their output interactively for a period=
|
|||||||
of time.
|
of time.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import Node
|
from mininet.node import Node
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ Simple example of sending output to multiple files and
|
|||||||
monitoring them
|
monitoring them
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.topo import SingleSwitchTopo
|
from mininet.topo import SingleSwitchTopo
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
Example to create a Mininet topology and connect it to the internet via NAT
|
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.cli import CLI
|
||||||
from mininet.log import lg
|
from mininet.log import lg
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ Validate that the port numbers match to the interface name,
|
|||||||
and that the ovs ports match the mininet ports.
|
and that the ovs ports match the mininet ports.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import Controller
|
from mininet.node import Controller
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ This example monitors a number of hosts using host.popen() and
|
|||||||
pmonitor()
|
pmonitor()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import CPULimitedHost
|
from mininet.node import CPULimitedHost
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
"Monitor multiple hosts using popen()/pmonitor()"
|
"Monitor multiple hosts using popen()/pmonitor()"
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.topo import SingleSwitchTopo
|
from mininet.topo import SingleSwitchTopo
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ but it exposes the configuration details and allows customization.
|
|||||||
For most tasks, the higher-level API will be preferable.
|
For most tasks, the higher-level API will be preferable.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import Node
|
from mininet.node import Node
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ iperf will hang indefinitely if the TCP handshake fails
|
|||||||
to complete.
|
to complete.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.topo import Topo
|
from mininet.topo import Topo
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ demonstrates:
|
|||||||
- running server processes (sshd in this case) on hosts
|
- running server processes (sshd in this case) on hosts
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
Test for sshd.py
|
Test for sshd.py
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
from mininet.clean import sh
|
from mininet.clean import sh
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
"Create a 64-node tree network, and test connectivity using ping."
|
"Create a 64-node tree network, and test connectivity using ping."
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.log import setLogLevel
|
from mininet.log import setLogLevel
|
||||||
from mininet.node import UserSwitch, OVSKernelSwitch # , KernelSwitch
|
from mininet.node import UserSwitch, OVSKernelSwitch # , KernelSwitch
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ list all nodes ('nodes'), to print out the network topology
|
|||||||
and bandwidth ('iperf'.)
|
and bandwidth ('iperf'.)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from cmd import Cmd
|
from cmd import Cmd
|
||||||
from os import isatty
|
from os import isatty
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"Utility functions for Mininet."
|
"Utility functions for Mininet."
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
from mininet.log import output, info, error, warn, debug
|
from mininet.log import output, info, error, warn, debug
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
from subprocess import check_output as co
|
from subprocess import check_output as co
|
||||||
from sys import exit
|
from sys import exit
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ Basic idea:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import os
|
import os
|
||||||
from os import stat, path
|
from os import stat, path
|
||||||
from stat import ST_MODE, ST_SIZE
|
from stat import ST_MODE, ST_SIZE
|
||||||
|
|||||||
Reference in New Issue
Block a user