#NEWLINE# @ command ( 'help' , '[command]' , hidden = True ) #NEWLINE# def help( args ) : #NEWLINE# #INDENT# if ( not args ) : #NEWLINE# #INDENT# print ( 'Usage: dyndns53 command [options]' ) #NEWLINE# print ( ) #NEWLINE# print ( "Type 'dyndns53 help <command>'" , end = '' ) #NEWLINE# print ( 'for help on a specific command.' ) #NEWLINE# print ( ) #NEWLINE# print ( 'Available commands are:' ) #NEWLINE# commands = sorted ( _commands . keys ( ) ) #NEWLINE# for name in commands : #NEWLINE# #INDENT# details = _commands [ name ] #NEWLINE# if ( not details . hidden ) : #NEWLINE# #INDENT# print ( ' ' , name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# name = args [ 0 ] #NEWLINE# if ( name not in _commands ) : #NEWLINE# #INDENT# print ( ( "Unknown command '%s'." % name ) , end = ' ' ) #NEWLINE# print ( "Type 'dyndns53 help' for usage." ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# details = _commands [ name ] #NEWLINE# print ( ( 'Usage: dyndns53 %s %s' % ( name , details . options ) ) ) #NEWLINE# if details . description : #NEWLINE# #INDENT# print ( ) #NEWLINE# print ( details . description )