#NEWLINE# def _help( self ) : #NEWLINE# #INDENT# print ( self . parser . format_help ( ) ) #NEWLINE# print ( 'commands:' ) #NEWLINE# longest = max ( [ len ( command ) for command in commands . commands ] ) #NEWLINE# format = ( '  %%-%ds %%s' % max ( 8 , ( longest + 1 ) ) ) #NEWLINE# commands = sorted ( self . commands . items ( ) ) #NEWLINE# for ( name , description ) in commands : #NEWLINE# #INDENT# print ( ( format % ( name , description ) ) )