Skip to content
Snippets Groups Projects
Commit caf024bc authored by Bob Lantz's avatar Bob Lantz
Browse files

Made help string a class var.

parent e555f83c
No related branches found
No related tags found
No related merge requests found
...@@ -76,29 +76,30 @@ def emptyline( self ): ...@@ -76,29 +76,30 @@ def emptyline( self ):
# must have the same interface # must have the same interface
# pylint: disable-msg=W0613,R0201 # pylint: disable-msg=W0613,R0201
helpStr = (
'You may also send a command to a node using:\n'
' <node> command {args}\n'
'For example:\n'
' mininet> h1 ifconfig\n'
'\n'
'The interpreter automatically substitutes IP addresses\n'
'for node names when a node is the first arg, so commands\n'
'like\n'
' mininet> h2 ping h3\n'
'should work.\n'
'\n'
'Some character-oriented interactive commands require\n'
'noecho:\n'
' mininet> noecho h2 vi foo.py\n'
'However, starting up an xterm/gterm is generally better:\n'
' mininet> xterm h2\n\n'
)
def do_help( self, args ): def do_help( self, args ):
"Describe available CLI commands." "Describe available CLI commands."
Cmd.do_help( self, args ) Cmd.do_help( self, args )
helpStr = (
'You may also send a command to a node using:\n'
' <node> command {args}\n'
'For example:\n'
' mininet> h1 ifconfig\n'
'\n'
'The interpreter automatically substitutes IP addresses\n'
'for node names when a node is the first arg, so commands\n'
'like\n'
' mininet> h2 ping h3\n'
'should work.\n'
'\n'
'Some character-oriented interactive commands require\n'
'noecho, e.g.\n'
' mininet> noecho h2 vi foo.py\n'
'However, starting up an xterm/gterm is generally better:\n'
' mininet> xterm h2\n\n'
)
if args is '': if args is '':
output( helpStr ) output( self.helpStr )
def do_nodes( self, args ): def do_nodes( self, args ):
"List all nodes." "List all nodes."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment