def take_action(self, parsed_args):
        if not parsed_args.cmd:
            action = HelpAction(None, None, default=self.app)
            action(self.app.parser, self.app.parser, None, None)
            return 1

        try:
            the_cmd = self.app.command_manager.find_command(
                parsed_args.cmd,
            )
            cmd_factory, cmd_name, search_args = the_cmd
        except __HOLE__:
            # Did not find an exact match
            cmd = parsed_args.cmd[0]
            fuzzy_matches = [k[0] for k in self.app.command_manager
                             if k[0].startswith(cmd)
                             ]
            if not fuzzy_matches:
                raise
            print('Command "%s" matches:' % cmd)
            for fm in sorted(fuzzy_matches):
                print('  %s' % fm)
            return

        self.app_args.cmd = search_args
        cmd = cmd_factory(self.app, self.app_args)
        full_name = ' '.join([self.app.NAME, cmd_name])
        cmd_parser = cmd.get_parser(full_name)
        cmd_parser.print_help(sys.stdout)
        return 0
dataset/ETHPy150Open TurboGears/gearbox/gearbox/commands/help.py/HelpCommand.take_action