def do_help(self, args):
if args.command:<EOL><INDENT>f = getattr(self, '<STR_LIT>' + args.command, None)<EOL>if f:<EOL><INDENT>f()<EOL>return<EOL><DEDENT>f = getattr(self, '<STR_LIT>' + args.command, None)<EOL>if not f:<EOL><INDENT>msg = self.nohelp % (args.command,)<EOL>self.stdout.write('<STR_LIT>'.format(msg))<EOL>return<EOL><DEDENT>docstr = getattr(f, '<STR_LIT>', None)<EOL>f = getattr(self, '<STR_LIT>' + args.command, None)<EOL>if f:<EOL><INDENT>parser = argparse.ArgumentParser(<EOL>prog=args.command,<EOL>description=docstr)<EOL>f(parser)<EOL>parser.print_help(file=self.stdout)<EOL><DEDENT>else:<EOL><INDENT>if not docstr:<EOL><INDENT>docstr = self.nohelp % (args.command,)<EOL><DEDENT>self.stdout.write('<STR_LIT>'.format(docstr))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>Cmd.do_help(self, '<STR_LIT>')<EOL><DEDENT>
print help on a command