SILENT KILLERPanel

Current Path: > > lib > python2.7 > site-packages > pip > > commands


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/python2.7/site-packages/pip//commands

NameTypeSizeLast ModifiedActions
__init__.py File 2244 bytes April 21 2022 18:08:21.
__init__.pyc File 2636 bytes April 21 2022 18:08:35.
__init__.pyo File 2636 bytes April 21 2022 18:08:35.
check.py File 1382 bytes April 21 2022 18:08:21.
check.pyc File 1599 bytes April 21 2022 18:08:35.
check.pyo File 1599 bytes April 21 2022 18:08:35.
completion.py File 2453 bytes April 21 2022 18:08:21.
completion.pyc File 2894 bytes April 21 2022 18:08:35.
completion.pyo File 2894 bytes April 21 2022 18:08:35.
download.py File 7810 bytes April 21 2022 18:08:21.
download.pyc File 6173 bytes April 21 2022 18:08:35.
download.pyo File 6173 bytes April 21 2022 18:08:35.
freeze.py File 2835 bytes April 21 2022 18:08:21.
freeze.pyc File 3193 bytes April 21 2022 18:08:35.
freeze.pyo File 3193 bytes April 21 2022 18:08:35.
hash.py File 1597 bytes April 21 2022 18:08:21.
hash.pyc File 2403 bytes April 21 2022 18:08:35.
hash.pyo File 2403 bytes April 21 2022 18:08:35.
help.py File 982 bytes April 21 2022 18:08:21.
help.pyc File 1352 bytes April 21 2022 18:08:35.
help.pyo File 1352 bytes April 21 2022 18:08:35.
install.py File 18289 bytes April 21 2022 18:08:21.
install.pyc File 12098 bytes April 21 2022 18:08:35.
install.pyo File 12098 bytes April 21 2022 18:08:35.
list.py File 11369 bytes April 21 2022 18:08:21.
list.pyc File 11139 bytes April 21 2022 18:08:35.
list.pyo File 11094 bytes April 21 2022 18:08:36.
search.py File 4502 bytes April 21 2022 18:08:21.
search.pyc File 4955 bytes April 21 2022 18:08:35.
search.pyo File 4955 bytes April 21 2022 18:08:35.
show.py File 5891 bytes April 21 2022 18:08:21.
show.pyc File 5747 bytes April 21 2022 18:08:35.
show.pyo File 5747 bytes April 21 2022 18:08:35.
uninstall.py File 2884 bytes April 21 2022 18:08:21.
uninstall.pyc File 3039 bytes April 21 2022 18:08:35.
uninstall.pyo File 3039 bytes April 21 2022 18:08:35.
wheel.py File 7729 bytes April 21 2022 18:08:21.
wheel.pyc File 6366 bytes April 21 2022 18:08:35.
wheel.pyo File 6366 bytes April 21 2022 18:08:35.

Reading File: //lib/python2.7/site-packages/pip//commands/__init__.py

"""
Package containing all pip commands
"""
from __future__ import absolute_import

from pip.commands.completion import CompletionCommand
from pip.commands.download import DownloadCommand
from pip.commands.freeze import FreezeCommand
from pip.commands.hash import HashCommand
from pip.commands.help import HelpCommand
from pip.commands.list import ListCommand
from pip.commands.check import CheckCommand
from pip.commands.search import SearchCommand
from pip.commands.show import ShowCommand
from pip.commands.install import InstallCommand
from pip.commands.uninstall import UninstallCommand
from pip.commands.wheel import WheelCommand


commands_dict = {
    CompletionCommand.name: CompletionCommand,
    FreezeCommand.name: FreezeCommand,
    HashCommand.name: HashCommand,
    HelpCommand.name: HelpCommand,
    SearchCommand.name: SearchCommand,
    ShowCommand.name: ShowCommand,
    InstallCommand.name: InstallCommand,
    UninstallCommand.name: UninstallCommand,
    DownloadCommand.name: DownloadCommand,
    ListCommand.name: ListCommand,
    CheckCommand.name: CheckCommand,
    WheelCommand.name: WheelCommand,
}


commands_order = [
    InstallCommand,
    DownloadCommand,
    UninstallCommand,
    FreezeCommand,
    ListCommand,
    ShowCommand,
    CheckCommand,
    SearchCommand,
    WheelCommand,
    HashCommand,
    CompletionCommand,
    HelpCommand,
]


def get_summaries(ordered=True):
    """Yields sorted (command name, command summary) tuples."""

    if ordered:
        cmditems = _sort_commands(commands_dict, commands_order)
    else:
        cmditems = commands_dict.items()

    for name, command_class in cmditems:
        yield (name, command_class.summary)


def get_similar_commands(name):
    """Command name auto-correct."""
    from difflib import get_close_matches

    name = name.lower()

    close_commands = get_close_matches(name, commands_dict.keys())

    if close_commands:
        return close_commands[0]
    else:
        return False


def _sort_commands(cmddict, order):
    def keyfn(key):
        try:
            return order.index(key[1])
        except ValueError:
            # unordered items should come last
            return 0xff

    return sorted(cmddict.items(), key=keyfn)

SILENT KILLER Tool