/usr/lib/python2.7/site-packages/pip/commands
NameSizeModeActions
check.py13820644editdlrm
check.pyc15990644editdlrm
check.pyo15990644editdlrm
completion.py24530644editdlrm
completion.pyc28940644editdlrm
completion.pyo28940644editdlrm
download.py78100644editdlrm
download.pyc61730644editdlrm
download.pyo61730644editdlrm
freeze.py28350644editdlrm
freeze.pyc31930644editdlrm
freeze.pyo31930644editdlrm
hash.py15970644editdlrm
hash.pyc24030644editdlrm
hash.pyo24030644editdlrm
help.py9820644editdlrm
help.pyc13520644editdlrm
help.pyo13520644editdlrm
install.py182890644editdlrm
install.pyc120980644editdlrm
install.pyo120980644editdlrm
list.py113690644editdlrm
list.pyc111390644editdlrm
list.pyo110940644editdlrm
search.py45020644editdlrm
search.pyc49550644editdlrm
search.pyo49550644editdlrm
show.py58910644editdlrm
show.pyc57470644editdlrm
show.pyo57470644editdlrm
uninstall.py28840644editdlrm
uninstall.pyc30390644editdlrm
uninstall.pyo30390644editdlrm
wheel.py77290644editdlrm
wheel.pyc63660644editdlrm
wheel.pyo63660644editdlrm
__init__.py22440644editdlrm
__init__.pyc26360644editdlrm
__init__.pyo26360644editdlrm
Edit: /usr/lib/python2.7/site-packages/pip/commands/__init__.py (2244B)
""" 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)