Your IP : 3.143.254.28


Current Path : /proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/getopt.cpython-37.opt-2.pyc

B

YI~dA�@s�ddddgZddlZyddlmZWnek
r@dd�ZYnXGd	d�de�ZeZgfd
d�Zgfdd�Z	dd
�Z
dd�Zdd�Zdd�Z
edkr�ddlZeeejdd�dddg��dS)�GetoptError�error�getopt�
gnu_getopt�N)�gettextcCs|S)N�)�srr�+/opt/alt/python37/lib64/python3.7/getopt.py�_)�r
c@s&eZdZdZdZddd�Zdd�ZdS)r�cCs||_||_t�|||�dS)N)�msg�opt�	Exception�__init__)�selfr
rrrr	r.szGetoptError.__init__cCs|jS)N)r
)rrrr	�__str__3szGetoptError.__str__N)r)�__name__�
__module__�__qualname__rr
rrrrrr	r+s
cCs�g}t|�td�kr|g}nt|�}x�|r�|d�d�r�|ddkr�|ddkr^|dd�}P|d�d�r�t||ddd�||dd��\}}q&t||ddd�||dd��\}}q&W||fS)Nrr�-z--��)�type�list�
startswith�do_longs�	do_shorts)�args�	shortopts�longopts�optsrrr	r8s (*cCs6g}g}t|t�r|g}nt|�}|�d�r>|dd�}d}ntj�d�rPd}nd}x�|�r,|ddkrz||dd�7}P|ddd�dkr�t||ddd�||dd��\}}qV|ddd�d	kr�|dd	kr�t||ddd�||dd��\}}qV|�r||7}PqV|�	|d�|dd�}qVW||fS)
N�+rTZPOSIXLY_CORRECTFrz--rr)
�
isinstance�strrr�os�environ�getrr�append)rrr r!Z	prog_argsZall_options_firstrrr	rcs2

( (cCs�y|�d�}Wntk
r&d}Yn X|d|�||dd�}}t||�\}}|r�|dkr�|svttd�||��|d|dd�}}n|dk	r�ttd�||��|�d||p�df�||fS)N�=rzoption --%s requires argumentrz%option --%s must not have an argumentz--r)�index�
ValueError�
long_has_argsrr
r()r!rr r�i�optarg�has_argrrr	r�s
rcs��fdd�|D�}|s(ttd������|kr8d�fS�d|krLd�fSt|�dkrjttd�����|d	}|�d�}|r�|dd
�}||fS)Ncsg|]}|���r|�qSr)r)�.0�o)rrr	�
<listcomp>�sz!long_has_args.<locals>.<listcomp>zoption --%s not recognizedFr)Trzoption --%s not a unique prefixr���)rr
�len�endswith)rr Z
possibilitiesZunique_matchr/r)rr	r,�s
r,cCs�x�|dkr�|d|dd�}}t||�rj|dkr^|sHttd�||��|d|dd�}}|d}}nd}|�d||f�qW||fS)Nrrrzoption -%s requires argumentr)�
short_has_argrr
r()r!Z	optstringrrrr.rrr	r�s

rcCsXx@tt|��D]0}|||kr*dkrnq|�d|d�SqWttd�||��dS)N�:rzoption -%s not recognized)�ranger4rrr
)rrr-rrr	r6�sr6�__main__rza:bzalpha=Zbeta)�__all__r%rr
�ImportErrorrrrrrrr,rr6r�sys�print�argvrrrr	�<module>"s +2

?>