(self,opts)
Print some helpful information
Print some helpful information
Print some helpful information
def _help(self,opts):
        'Print some helpful information'

        print 'Available commands:'
        for cmd in Cli.commands:
            meth = eval('self._%s'%cmd)
            print '\t%s: %s'%(cmd,meth.__doc__)
            continue
        print '\nPer-command help:\n'

        for cmd in Cli.commands:
            meth = eval('self._%s_op'%cmd)
            op = meth()
            if not op: continue
            print '%s'%cmd.upper()
            op.print_help()
            print
            continue
def _help ( self , opts ) : print 'Available commands:' for cmd in Cli . commands : meth = eval ( 'self._%s' % cmd ) print '\t%s: %s' % ( cmd , meth . __doc__ ) continue print '\nPer-command help:\n' for cmd in Cli . commands : meth = eval ( 'self._%s_op' % cmd ) op = meth ( ) if not op : continue print '%s' % cmd . upper ( ) op . print_help ( ) print continue