Current Path: > > opt > > hc_python > lib > python3.12 > site-packages > pip > _internal > > cli
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 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
__init__.py | File | 131 bytes | May 23 2025 10:34:25. | |
autocompletion.py | File | 6864 bytes | May 23 2025 10:34:25. | |
base_command.py | File | 8351 bytes | May 23 2025 10:34:25. | |
cmdoptions.py | File | 31909 bytes | May 23 2025 10:34:25. | |
command_context.py | File | 774 bytes | May 23 2025 10:34:25. | |
index_command.py | File | 5720 bytes | May 23 2025 10:34:25. | |
main.py | File | 2816 bytes | May 23 2025 10:34:25. | |
main_parser.py | File | 4337 bytes | May 23 2025 10:34:25. | |
parser.py | File | 10825 bytes | May 23 2025 10:34:25. | |
progress_bars.py | File | 4435 bytes | May 23 2025 10:34:25. | |
req_command.py | File | 12934 bytes | May 23 2025 10:34:25. | |
spinners.py | File | 5118 bytes | May 23 2025 10:34:25. | |
status_codes.py | File | 116 bytes | May 23 2025 10:34:25. |
"""Primary application entrypoint.""" import locale import logging import os import sys import warnings from typing import List, Optional from pip._internal.cli.autocompletion import autocomplete from pip._internal.cli.main_parser import parse_command from pip._internal.commands import create_command from pip._internal.exceptions import PipError from pip._internal.utils import deprecation logger = logging.getLogger(__name__) # Do not import and use main() directly! Using it directly is actively # discouraged by pip's maintainers. The name, location and behavior of # this function is subject to change, so calling it directly is not # portable across different pip versions. # In addition, running pip in-process is unsupported and unsafe. This is # elaborated in detail at # https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program. # That document also provides suggestions that should work for nearly # all users that are considering importing and using main() directly. # However, we know that certain users will still want to invoke pip # in-process. If you understand and accept the implications of using pip # in an unsupported manner, the best approach is to use runpy to avoid # depending on the exact location of this entry point. # The following example shows how to use runpy to invoke pip in that # case: # # sys.argv = ["pip", your, args, here] # runpy.run_module("pip", run_name="__main__") # # Note that this will exit the process after running, unlike a direct # call to main. As it is not safe to do any processing after calling # main, this should not be an issue in practice. def main(args: Optional[List[str]] = None) -> int: if args is None: args = sys.argv[1:] # Suppress the pkg_resources deprecation warning # Note - we use a module of .*pkg_resources to cover # the normal case (pip._vendor.pkg_resources) and the # devendored case (a bare pkg_resources) warnings.filterwarnings( action="ignore", category=DeprecationWarning, module=".*pkg_resources" ) # Configure our deprecation warnings to be sent through loggers deprecation.install_warning_logger() autocomplete() try: cmd_name, cmd_args = parse_command(args) except PipError as exc: sys.stderr.write(f"ERROR: {exc}") sys.stderr.write(os.linesep) sys.exit(1) # Needed for locale.getpreferredencoding(False) to work # in pip._internal.utils.encoding.auto_decode try: locale.setlocale(locale.LC_ALL, "") except locale.Error as e: # setlocale can apparently crash if locale are uninitialized logger.debug("Ignoring error %s when setting locale", e) command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) return command.main(cmd_args)
SILENT KILLER Tool