AlkantarClanX12

Your IP : 3.22.77.191


Current Path : /proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/getopt.cpython-33.pyo

�
��f@c@sdZddddgZddlZyddlmZWnek
rXdd	�ZYnXGd
d�de�ZeZgdd�Z	gdd�Z
d
d�Zdd�Zdd�Z
dd�ZedkrddlZee	ejdd�dddg��ndS(u�Parser for command line options.

This module helps scripts to parse the command line arguments in
sys.argv.  It supports the same conventions as the Unix getopt()
function (including the special meanings of arguments of the form `-'
and `--').  Long options similar to those supported by GNU software
may be used as well via an optional third argument.  This module
provides two functions and an exception:

getopt() -- Parse command line options
gnu_getopt() -- Like getopt(), but allow option and non-option arguments
to be intermixed.
GetoptError -- exception (class) raised with 'opt' attribute, which is the
option involved with the exception.
uGetoptErroruerrorugetoptu
gnu_getoptiN(ugettextcCs|S(N((us((u+/opt/alt/python33/lib64/python3.3/getopt.pyu_)su_cBs;|EeZdZdZdZddd�Zdd�ZdS(uGetoptErrorucCs)||_||_tj|||�dS(N(umsguoptu	Exceptionu__init__(uselfumsguopt((u+/opt/alt/python33/lib64/python3.3/getopt.pyu__init__.s		uGetoptError.__init__cCs|jS(N(umsg(uself((u+/opt/alt/python33/lib64/python3.3/getopt.pyu__str__3suGetoptError.__str__N(u__name__u
__module__u__qualname__uoptumsgu__init__u__str__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/getopt.pyuGetoptError+sc	Csg}t|�td�kr*|g}nt|�}x�|r|djd�r|ddkr|ddkr�|dd�}Pn|djd�r�t||ddd�||dd��\}}q9t||ddd�||dd��\}}q9W||fS(u@getopt(args, options[, long_options]) -> opts, args

    Parses command line options and parameter list.  args is the
    argument list to be parsed, without the leading reference to the
    running program.  Typically, this means "sys.argv[1:]".  shortopts
    is the string of option letters that the script wants to
    recognize, with options that require an argument followed by a
    colon (i.e., the same format that Unix getopt() uses).  If
    specified, longopts is a list of strings with the names of the
    long options which should be supported.  The leading '--'
    characters should not be included in the option name.  Options
    which require an argument should be followed by an equal sign
    ('=').

    The return value consists of two elements: the first is a list of
    (option, value) pairs; the second is the list of program arguments
    left after the option list was stripped (this is a trailing slice
    of the first argument).  Each option-and-value pair returned has
    the option as its first element, prefixed with a hyphen (e.g.,
    '-x'), and the option argument as its second element, or an empty
    string if the option has no argument.  The options occur in the
    list in the same order in which they were found, thus allowing
    multiple occurrences.  Long and short options may be mixed.

    uiu-u--iNi(utypeulistu
startswithudo_longsu	do_shorts(uargsu	shortoptsulongoptsuopts((u+/opt/alt/python33/lib64/python3.3/getopt.pyugetopt8s,67cCs�g}g}t|t�r'|g}nt|�}|jd�r[|dd�}d	}n!tjjd�rvd	}nd
}x|r�|ddkr�||dd�7}Pn|ddd�dkr�t	||ddd�||dd��\}}q|ddd�dkr]|ddkr]t
||ddd�||dd��\}}q|rq||7}Pq|j|d�|dd�}qW||fS(ugetopt(args, options[, long_options]) -> opts, args

    This function works like getopt(), except that GNU style scanning
    mode is used by default. This means that option and non-option
    arguments may be intermixed. The getopt() function stops
    processing options as soon as a non-option argument is
    encountered.

    If the first character of the option string is `+', or if the
    environment variable POSIXLY_CORRECT is set, then option
    processing stops as soon as a non-option argument is encountered.

    u+iNuPOSIXLY_CORRECTiu--iu-TF(u
isinstanceustrulistu
startswithuTrueuosuenvironugetuFalseudo_longsu	do_shortsuappend(uargsu	shortoptsulongoptsuoptsu	prog_argsuall_options_first((u+/opt/alt/python33/lib64/python3.3/getopt.pyu
gnu_getoptcs2			6*6
cCsy|jd�}Wntk
r-d}Yn&X|d|�||dd�}}t||�\}}|r�|dkr�|s�ttd�||��n|d|dd�}}q�n(|dk	r�ttd�||��n|jd||p�df�||fS(Nu=iuoption --%s requires argumentiu%option --%s must not have an argumentu--u(uindexu
ValueErroruNoneu
long_has_argsuGetoptErroru_uappend(uoptsuoptulongoptsuargsuiuoptarguhas_arg((u+/opt/alt/python33/lib64/python3.3/getopt.pyudo_longs�s
%!udo_longscs��fdd�|D�}|s;ttd�����n�|krQd�fS�d|krkd	�fSt|�dkr�ttd�����n|d}|jd�}|r�|dd
�}n||fS(Ncs%g|]}|j��r|�qS((u
startswith(u.0uo(uopt(u+/opt/alt/python33/lib64/python3.3/getopt.pyu
<listcomp>�s	u!long_has_args.<locals>.<listcomp>uoption --%s not recognizedu=iuoption --%s not a unique prefixiFTi����(uGetoptErroru_uFalseuTrueulenuendswith(uoptulongoptsu
possibilitiesuunique_matchuhas_arg((uoptu+/opt/alt/python33/lib64/python3.3/getopt.pyu
long_has_args�s


u
long_has_argscCs�x�|dkr�|d|dd�}}t||�r�|dkr�|sgttd�||��n|d|dd�}}n|d}}nd}|jd||f�qW||fS(Nuiiuoption -%s requires argumentu-(u
short_has_arguGetoptErroru_uappend(uoptsu	optstringu	shortoptsuargsuoptuoptarg((u+/opt/alt/python33/lib64/python3.3/getopt.pyu	do_shorts�su	do_shortscCsnxNtt|��D]:}|||ko4dknr|jd|d�SqWttd�||��dS(Nu:iuoption -%s not recognized(urangeulenu
startswithuGetoptErroru_(uoptu	shortoptsui((u+/opt/alt/python33/lib64/python3.3/getopt.pyu
short_has_arg�s u
short_has_argu__main__iua:bualpha=ubeta(u__doc__u__all__uosugettextu_uImportErroru	ExceptionuGetoptErroruerrorugetoptu
gnu_getoptudo_longsu
long_has_argsu	do_shortsu
short_has_argu__name__usysuprintuargv(((u+/opt/alt/python33/lib64/python3.3/getopt.pyu<module>s"
+2