/
usr
/
lib
/
python2.7
/
site-packages
/
pip
/
commands
/
/usr/lib/python2.7/site-packages/pip/commands
mkdir
upload
Name
Size
Mode
Actions
check.py
1382
0644
edit
dl
rm
check.pyc
1599
0644
edit
dl
rm
check.pyo
1599
0644
edit
dl
rm
completion.py
2453
0644
edit
dl
rm
completion.pyc
2894
0644
edit
dl
rm
completion.pyo
2894
0644
edit
dl
rm
download.py
7810
0644
edit
dl
rm
download.pyc
6173
0644
edit
dl
rm
download.pyo
6173
0644
edit
dl
rm
freeze.py
2835
0644
edit
dl
rm
freeze.pyc
3193
0644
edit
dl
rm
freeze.pyo
3193
0644
edit
dl
rm
hash.py
1597
0644
edit
dl
rm
hash.pyc
2403
0644
edit
dl
rm
hash.pyo
2403
0644
edit
dl
rm
help.py
982
0644
edit
dl
rm
help.pyc
1352
0644
edit
dl
rm
help.pyo
1352
0644
edit
dl
rm
install.py
18289
0644
edit
dl
rm
install.pyc
12098
0644
edit
dl
rm
install.pyo
12098
0644
edit
dl
rm
list.py
11369
0644
edit
dl
rm
list.pyc
11139
0644
edit
dl
rm
list.pyo
11094
0644
edit
dl
rm
search.py
4502
0644
edit
dl
rm
search.pyc
4955
0644
edit
dl
rm
search.pyo
4955
0644
edit
dl
rm
show.py
5891
0644
edit
dl
rm
show.pyc
5747
0644
edit
dl
rm
show.pyo
5747
0644
edit
dl
rm
uninstall.py
2884
0644
edit
dl
rm
uninstall.pyc
3039
0644
edit
dl
rm
uninstall.pyo
3039
0644
edit
dl
rm
wheel.py
7729
0644
edit
dl
rm
wheel.pyc
6366
0644
edit
dl
rm
wheel.pyo
6366
0644
edit
dl
rm
__init__.py
2244
0644
edit
dl
rm
__init__.pyc
2636
0644
edit
dl
rm
__init__.pyo
2636
0644
edit
dl
rm
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)
Save
cmd:
run