PHP 8.2.30
Preview: help.py Size: 982 B
/lib/python3.6/site-packages/pip/commands/help.py

from __future__ import absolute_import

from pip.basecommand import Command, SUCCESS
from pip.exceptions import CommandError


class HelpCommand(Command):
    """Show help for commands"""
    name = 'help'
    usage = """
      %prog <command>"""
    summary = 'Show help for commands.'

    def run(self, options, args):
        from pip.commands import commands_dict, get_similar_commands

        try:
            # 'pip help' with no args is handled by pip.__init__.parseopt()
            cmd_name = args[0]  # the command we need help for
        except IndexError:
            return SUCCESS

        if cmd_name not in commands_dict:
            guess = get_similar_commands(cmd_name)

            msg = ['unknown command "%s"' % cmd_name]
            if guess:
                msg.append('maybe you meant "%s"' % guess)

            raise CommandError(' - '.join(msg))

        command = commands_dict[cmd_name]()
        command.parser.print_help()

        return SUCCESS

Directory Contents

Dirs: 1 × Files: 13

Name Size Perms Modified Actions
- drwxr-xr-x 2024-06-15 07:03:53
Edit Download
1.35 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
2.40 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
7.63 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
2.77 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
1.56 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
982 B lrw-r--r-- 2024-04-06 13:40:45
Edit Download
17.86 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
11.10 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
4.40 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
5.75 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
2.82 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
7.55 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download
2.19 KB lrw-r--r-- 2024-04-06 13:40:45
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).