[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.221.123.33: ~ $
"""Primary application entrypoint.
"""
from __future__ import absolute_import

import locale
import logging
import os
import sys

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
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

if MYPY_CHECK_RUNNING:
    from typing import List, Optional

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=None):
    # type: (Optional[List[str]]) -> int
    if args is None:
        args = sys.argv[1:]

    # 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("ERROR: {}".format(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)

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
.__init__.pyo.40009 File 256 B 0644
.autocompletion.pyo.40009 File 5.39 KB 0644
.cmdoptions.pyo.40009 File 24.87 KB 0644
.main.pyo.40009 File 1.72 KB 0644
.main_parser.pyo.40009 File 2.63 KB 0644
.progress_bars.pyo.40009 File 9.99 KB 0644
.status_codes.pyo.40009 File 420 B 0644
__init__.py File 132 B 0644
__init__.pyc File 256 B 0644
__init__.pyo File 256 B 0644
autocompletion.py File 6.39 KB 0644
autocompletion.pyc File 5.39 KB 0644
autocompletion.pyo File 5.39 KB 0644
base_command.py File 9.08 KB 0644
base_command.pyc File 7.88 KB 0644
base_command.pyo File 7.76 KB 0644
cmdoptions.py File 28.11 KB 0644
cmdoptions.pyc File 24.87 KB 0644
cmdoptions.pyo File 24.87 KB 0644
command_context.py File 975 B 0644
command_context.pyc File 1.64 KB 0644
command_context.pyo File 1.58 KB 0644
main.py File 2.55 KB 0644
main.pyc File 1.72 KB 0644
main.pyo File 1.72 KB 0644
main_parser.py File 2.78 KB 0644
main_parser.pyc File 2.63 KB 0644
main_parser.pyo File 2.63 KB 0644
parser.py File 9.26 KB 0644
parser.pyc File 10.46 KB 0644
parser.pyo File 10.43 KB 0644
progress_bars.py File 8.91 KB 0644
progress_bars.pyc File 9.99 KB 0644
progress_bars.pyo File 9.99 KB 0644
req_command.py File 14.78 KB 0644
req_command.pyc File 11.89 KB 0644
req_command.pyo File 11.7 KB 0644
spinners.py File 5.38 KB 0644
spinners.pyc File 6.27 KB 0644
spinners.pyo File 6.2 KB 0644
status_codes.py File 156 B 0644
status_codes.pyc File 420 B 0644
status_codes.pyo File 420 B 0644