MCPcopy Create free account
hub / github.com/mininet/mininet / waitOutput

Method waitOutput

mininet/node.py:365–377  ·  view source on GitHub ↗

Wait for a command to complete. Completion is signaled by a sentinel character, ASCII(127) appearing in the output stream. Wait for the sentinel and return the output, including trailing newline. verbose: print output interactively

( self, verbose=False, findPid=True )

Source from the content-addressed store, hash-verified

363 return data
364
365 def waitOutput( self, verbose=False, findPid=True ):
366 """Wait for a command to complete.
367 Completion is signaled by a sentinel character, ASCII(127)
368 appearing in the output stream. Wait for the sentinel and return
369 the output, including trailing newline.
370 verbose: print output interactively"""
371 log = info if verbose else debug
372 output = ''
373 while self.waiting:
374 data = self.monitor( findPid=findPid )
375 output += data
376 log( data )
377 return output
378
379 def cmd( self, *args, **kwargs ):
380 """Send a command, wait for output, and return it.

Callers 3

cmdMethod · 0.95
runMethod · 0.45
iperfMethod · 0.45

Calls 2

monitorMethod · 0.95
logFunction · 0.85

Tested by

no test coverage detected