403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.7/site-packages/pip/_internal/cli/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.7/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-37.pyc
B

�N�a��@s�dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZmZddlmZdd�d	d
�Ze	eeeee
ed�dd
�Zeeeed�dd�ZdS)zBLogic that powers autocompletion installed by ``pip completion``.
�N)�chain)�Any�Iterable�List�Optional)�create_main_parser)�
commands_dict�create_command)�get_default_environment)�returncs�dtjkrdStjd��dd��ttjd�}y�|d�Wntk
rZd�YnXt�}tt�}g}d}x�D]}||krx|}PqxW|dk	�r|dkr�t�	d���
d�o�|d	k}|�rt�}������fd
d�|j
dd
�D�}|�rx|D]}	t|	�q�Wt�	d�t|�}
xH|
jjD]<}|jtjk�r&x&|j|jD]}|�||jf��qFW�q&Wdd��d|d�D���fdd�|D�}�fdd�|D�}t�||
jj�}
|
�r�t�|
�}dd�|D�}x�|D]>}|d}|d�r|ddd�dk�r|d7}t|��q�Wn�dd�|jD�}|�|j�t�|�}��
d��r~xN|D]$}|jtjk�rT||j|j7}�qTWn t�||�}
|
�r�tt�|
��}td��fdd�|D���t�	d�dS)z:Entry Point for completion of main and subcommand options.ZPIP_AUTO_COMPLETENZ
COMP_WORDS�Z
COMP_CWORD��help�-)ZshowZ	uninstallcs0g|](}|j���r|j�dd�kr|j�qS)rN)Zcanonical_name�
startswith)�.0�dist)�cwords�lc��D/usr/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py�
<listcomp>3sz autocomplete.<locals>.<listcomp>T)Z
local_onlycSsg|]}|�d�d�qS)�=r)�split)r�xrrrrFscs g|]\}}|�kr||f�qSrr)rr�v)�	prev_optsrrrGscs"g|]\}}|���r||f�qSr)r)r�kr)�currentrrrIscSsg|]}|df�qS)rr)r�pathrrrrTsr�z--rcSsg|]
}|j�qSr)�option_list)r�irrrr^s� csg|]}|���r|�qSr)r)rr)rrrrks) �os�environr�int�
IndexErrorr�listr�sys�exitrr
�lowerZiter_installed_distributions�printr	�parserZoption_list_allr�optparse�
SUPPRESS_HELPZ
_long_optsZ_short_opts�append�nargs�get_path_completion_type�auto_complete_pathsZ
option_groupsr!r�
from_iterable�join)�cwordr-�subcommands�optionsZsubcommand_nameZwordZshould_list_installed�envZ	installedrZ
subcommand�optZopt_str�completion_type�paths�optionZ	opt_label�optsZflattened_optsr)rrrrr�autocompletesz









 

r?)rr6r>rcCs�|dks||d�d�sdSxr|D]j}|jtjkr6q$xVt|��d�D]D}||d�d�d|krF|jr�tdd�|j�d�D��rF|jSqFWq$WdS)	aLGet the type of path completion (``file``, ``dir``, ``path`` or None)

    :param cwords: same as the environmental variable ``COMP_WORDS``
    :param cword: same as the environmental variable ``COMP_CWORD``
    :param opts: The available options to check
    :return: path completion type (``file``, ``dir``, ``path`` or None)
    r rN�/rrcss|]}|dkVqdS))r�file�dirNr)rrrrr�	<genexpr>�sz+get_path_completion_type.<locals>.<genexpr>)rrr.r/�strr�metavar�any)rr6r>r:�orrrr2os

r2)rr;rc#s�tj�|�\}�tj�|�}t�|tj�s.dStj�����fdd�t�|�D�}xh|D]`}tj�||�}tj�tj�||��}|dkr�tj�	|�r�|VqXtj�
|�rXtj�|d�VqXWdS)aoIf ``completion_type`` is ``file`` or ``path``, list all regular files
    and directories starting with ``current``; otherwise only list directories
    starting with ``current``.

    :param current: The word to be completed
    :param completion_type: path completion type(`file`, `path` or `dir`)i
    :return: A generator of regular files and/or directories
    Nc3s$|]}tj�|����r|VqdS)N)r$r�normcaser)rr)�filenamerrrC�sz&auto_complete_paths.<locals>.<genexpr>rBr
)r$rr�abspath�access�R_OKrH�listdirr5�isfile�isdir)rr;Z	directoryZcurrent_pathZ	file_list�fr:Z	comp_filer)rIrr3�s	
r3)�__doc__r.r$r)�	itertoolsr�typingrrrrZpip._internal.cli.main_parserrZpip._internal.commandsrr	Zpip._internal.metadatar
r?rDr&r2r3rrrr�<module>sa

Youez - 2016 - github.com/yon3zu
LinuXploit