#NEWLINE# def _metavar_formatter( self , action , default_metavar ) : #NEWLINE# #INDENT# if ( action . dest != 'command' ) : #NEWLINE# #INDENT# return super ( _Help , self ) . _metavar_formatter ( action , commands ) #NEWLINE# #UNINDENT# commands = sorted ( self . commands . items ( ) ) #NEWLINE# max_len = max ( [ len ( name ) for ( name , help ) in commands ] ) #NEWLINE# output = [ ] #NEWLINE# for ( name , command ) in commands : #NEWLINE# #INDENT# output . append ( ( '\t%-*s\t%s' % ( max_len , name , command . short ) ) ) #NEWLINE# #UNINDENT# def format( tuple_size ) : #NEWLINE# #INDENT# res = '\n' . join ( output ) #NEWLINE# return ( ( res , ) * tuple_size ) #NEWLINE# #UNINDENT# return format