8000 mininet/mininet/cli.py at devel/nattedtopo · jwkim90/mininet · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
449 lines (391 loc) · 14.6 KB

cli.py

File metadata and controls

449 lines (391 loc) · 14.6 KB
except KeyboardInterrupt:
# There is an at least one race condition here, since
# it's possible to interrupt ourselves after we've
# read data but before it has been printed.
node.sendInt()
def precmd( self, line ):
"allow for comments in the cli"
if '#' in line:
line = line.split( '#' )[ 0 ]
return line
# Helper functions
def isReadable( poller ):
"Check whether a Poll object has a readable fd."
for fdmask in poller.poll( 0 ):
mask = fdmask[ 1 ]
if mask & POLLIN:
return True
0