AlkantarClanX12

Your IP : 13.58.40.171


Current Path : /proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/optparse.cpython-311.opt-2.pyc

�

c��f�����	dZgd�ZdZddlZddlZddlZd�Z	ddlmZmZn#e	$r	d�Zd�ZYnwxYweZ
Gd	�d
e��ZGd�de��Z
Gd
�de
��ZGd�de��ZGd�de��ZGd�de��ZGd�d��ZGd�de��ZGd�de��Zd�Zd�Zee
d��fee
d��fee
d��fee
d��fd �Zd!�Zd"�Zd#ZGd$�d%��Zd&Zd'ZGd(�d)��Z Gd*�d+��Z!Gd,�d-e!��Z"Gd.�d/e!��Z#d0�Z$eZ%dS)1z1.5.3)�Option�make_option�
SUPPRESS_HELP�SUPPRESS_USAGE�Values�OptionContainer�OptionGroup�OptionParser�
HelpFormatter�IndentedHelpFormatter�TitledHelpFormatter�
OptParseError�OptionError�OptionConflictError�OptionValueError�BadOptionError�check_choicea"
Copyright (c) 2001-2006 Gregory P. Ward.  All rights reserved.
Copyright (c) 2002-2006 Python Software Foundation.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

  * Neither the name of the author nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
�Nc�@�d|jjt|��|fzS)Nz<%s at 0x%x: %s>)�	__class__�__name__�id��selfs �//opt/alt/python311/lib64/python3.11/optparse.py�_reprrOs�����!8�"�T�(�(�D� I�I�I�)�gettext�ngettextc��|S�N�)�messages rrr\s���rc��|dkr|S|S�N�r!)�singular�plural�ns   rrr_s����6�6��O��
rc��eZdZd�Zd�ZdS)r
c��||_dSr ��msg�rr,s  r�__init__zOptParseError.__init__hs
������rc��|jSr r+rs r�__str__zOptParseError.__str__ks	���x�rN�r�
__module__�__qualname__r.r0r!rrr
r
gs2�������������rr
c��eZdZ	d�Zd�ZdS)rc�<�||_t|��|_dSr )r,�str�	option_id)rr,�options   rr.zOptionError.__init__us������V������rc�B�|jrd|j�d|j��S|jS)Nzoption z: )r7r,rs rr0zOptionError.__str__ys-���>�	�	�&*�n�n�n�d�h�h�?�?��8�OrNr1r!rrrros7�������
%�%�%�����rrc��eZdZdS)rN�rr2r3r!rrrrs�������rrc��eZdZdS)rNr;r!rrrr�s�������rrc��eZdZ	d�Zd�ZdS)rc��||_dSr )�opt_str�rr?s  rr.zBadOptionError.__init__�s
������rc�0�td��|jzS)Nzno such option: %s)�_r?rs rr0zBadOptionError.__str__�s���%�&�&���5�5rNr1r!rrrr�s7����������6�6�6�6�6rrc��eZdZ	d�Zd�ZdS)�AmbiguousOptionErrorc�J�t�||��||_dSr )rr.�
possibilities)rr?rFs   rr.zAmbiguousOptionError.__init__�s&������g�.�.�.�*����rc�d�td��|jd�|j��fzS)Nzambiguous option: %s (%s?)�, )rBr?�joinrFrs rr0zAmbiguousOptionError.__str__�s3���.�/�/��<����4�+=�!>�!>�?�@�	ArNr1r!rrrDrD�s<�������+�+�+�A�A�A�A�ArrDc�n�eZdZ	dZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�ZdS)r
�nonec��d|_||_|�?	ttjd��}n#t
tf$rd}YnwxYw|dz}||_t|t|dz
|dz����x|_
|_d|_d|_
d|_||_d|_i|_d|_d|_dS)	N�COLUMNS�P��rz%defaultz%s %sz%s=%s)�parser�indent_increment�int�os�environ�KeyError�
ValueError�width�min�max�
help_position�max_help_position�current_indent�level�
help_width�short_first�default_tag�option_strings�_short_opt_fmt�
_long_opt_fmt�rrRr\rXr`s     rr.zHelpFormatter.__init__�s���
��� 0����=�
��B�J�y�1�2�2�����j�)�
�
�
�����
�����Q�J�E���
��%�s�5�2�:�7G�!�7K�'L�'L�M�M�	N���T�3������
����&���%��� ���%���$����s�2�A�Ac��||_dSr )rQ�rrQs  r�
set_parserzHelpFormatter.set_parser�s
������rc�L�|dvrtd|z���d|zdz|_dS)N)�� z/invalid metavar delimiter for short options: %r�%s)rWrc�r�delims  r�set_short_opt_delimiterz%HelpFormatter.set_short_opt_delimiter�sA���	�!�!��A�E�I�K�K�
K�"�U�l�T�1����rc�L�|dvrtd|z���d|zdz|_dS)N)�=rkz.invalid metavar delimiter for long options: %rrl)rWrdrms  r�set_long_opt_delimiterz$HelpFormatter.set_long_opt_delimiter�sA���
�"�"��@�5�H�J�J�
J�!�E�\�D�0����rc�P�|xj|jz
c_|xjdz
c_dSr$�r]rRr^rs r�indentzHelpFormatter.indent�s,�����t�4�4����
�
�a��
�
�
�
rc�P�|xj|jzc_|xjdzc_dSr$rtrs r�dedentzHelpFormatter.dedent�s,�����t�4�4����
�
�a��
�
�
�
rc� �td����Nzsubclasses must implement��NotImplementedError�r�usages  r�format_usagezHelpFormatter.format_usage����!�"=�>�>�>rc� �td���ryrz�r�headings  r�format_headingzHelpFormatter.format_headingrrc��	t|j|jz
d��}d|jz}tj||||���S)N�rk)�initial_indent�subsequent_indent)rZrXr]�textwrap�fill)r�text�
text_widthrus    r�_format_textzHelpFormatter._format_textsS��	����d�&9�9�2�>�>�
��T�(�(���}�T�'�,2�/5�7�7�7�	7rc�:�|r|�|��dzSdS�N�
rj�r��r�descriptions  r�format_descriptionz HelpFormatter.format_descriptions(���	��$�$�[�1�1�D�8�8��2rc�@�|rd|�|��zdzSdSr�r�)r�epilogs  r�
format_epilogzHelpFormatter.format_epilogs-���	��$�+�+�F�3�3�3�d�:�:��2rc���|j�|js|jS|jj�|j��}|tus|�|j}|j�|jt|����Sr )
rQra�help�defaults�get�dest�
NO_DEFAULT�NO_DEFAULT_VALUE�replacer6)rr8�
default_values   r�expand_defaultzHelpFormatter.expand_defaultso���;��d�&6���;����,�0�0���=�=�
��J�&�&�-�*?� �1�M��{�"�"�4�#3�S��5G�5G�H�H�Hrc�N��g}�j|}�j�jz
dz
}t|��|krd�jd|fz}�j}nd�jd||fz}d}|�|��|jrz��|��}tj|�j	��}|�d|d|dfz��|�
�fd�|dd�D����n!|dd	kr|�d	��d�|��S)
NrO�%*s%s
rjz	%*s%-*s  rc�*��g|]}d�jd|fz��S)r�rj)r[)�.0�liners  �r�
<listcomp>z/HelpFormatter.format_option.<locals>.<listcomp>Es8���7�7�7�#�%��(:�B��'E�E�7�7�7rr%���r�)rbr[r]�len�appendr�r�r��wrapr_�extendrI)rr8�result�opts�	opt_width�indent_first�	help_text�
help_liness`       r�
format_optionzHelpFormatter.format_option(sT������"�6�*���&��)<�<�q�@�	��t�9�9�y� � ��� 3�R��>�>�D��-�L�L��$�"5�r�9�d�!K�K�D��L��
�
�d�����;�	 ��+�+�F�3�3�I�!��y�$�/�B�B�J��M�M�)�|�R��A��&G�G�H�H�H��M�M�7�7�7�7�'1�!�"�"�~�7�7�7�
8�
8�
8�
8�
�"�X��
�
��M�M�$�����w�w�v���rc�t�|���d}|jD]F}|�|��}||j|<t	|t|��|jz��}�G|���|jD]P}|jD]F}|�|��}||j|<t	|t|��|jz��}�G�Q|���|���t|dz|j
��|_t	|j|jz
d��|_
dS)NrrOr�)ru�option_list�format_option_stringsrbrZr�r]�
option_groupsrwrYr\r[rXr_)rrQ�max_len�opt�strings�groups      r�store_option_stringsz"HelpFormatter.store_option_stringsKs5�����
�
�
����%�	G�	G�C��0�0��5�5�G�'.�D���$��'�3�w�<�<�$�2E�#E�F�F�G�G����
�
�
��)�	K�	K�E��(�
K�
K���4�4�S�9�9��+2��#�C�(��g�s�7�|�|�d�6I�'I�J�J���
K�	
���
�
�
����
�
�
� ��1��d�.D�E�E����d�j�4�+=�=�r�B�B����rc�,���	|���rI|jp|j������fd�|jD��}��fd�|jD��}n|j}|j}�jr||z}n||z}d�|��S)Nc�(��g|]}�j|�fz��Sr!)rc)r��sopt�metavarrs  ��rr�z7HelpFormatter.format_option_strings.<locals>.<listcomp>as5���:�:�:�"��-��w��?�:�:�:rc�(��g|]}�j|�fz��Sr!)rd)r��loptr�rs  ��rr�z7HelpFormatter.format_option_strings.<locals>.<listcomp>cs5���8�8�8�!��+�t�W�o�=�8�8�8rrH)�takes_valuer�r��upper�_short_opts�
_long_optsr`rI)rr8�
short_opts�	long_optsr�r�s`    @rr�z#HelpFormatter.format_option_strings]s�����N������	*��n�;���(9�(9�(;�(;�G�:�:�:�:�:�&,�&8�:�:�:�J�8�8�8�8�8�%+�%6�8�8�8�I�I� �+�J��)�I���	*��	�)�D�D��z�)�D��y�y����rN)rr2r3r�r.rhrorrrurwr~r�r�r�r�r�r�r�r�r!rrr
r
�s
������'�R��%�%�%�2���2�2�2�1�1�1�������
?�?�?�?�?�?�
7�
7�
7�������I�I�I�!�!�!�FC�C�C�$����rr
c�,�eZdZ					dd�Zd�Zd�ZdS)	rrO�Nr%c�B�t�|||||��dSr �r
r.res     rr.zIndentedHelpFormatter.__init__t�8��
	����"�$5�u�k�	K�	K�	K�	K�	Krc�&�td��|zS)Nz
Usage: %s
)rBr|s  rr~z"IndentedHelpFormatter.format_usage|s������%�'�'rc��d|jd|fzS)Nz%*s%s:
rj)r]r�s  rr�z$IndentedHelpFormatter.format_headings���T�0�"�g�>�>�>r)rOr�Nr%�rr2r3r.r~r�r!rrrrps]�������#$�#%���	K�K�K�K�(�(�(�?�?�?�?�?rrc�,�eZdZ					dd�Zd�Zd�ZdS)rrr�Nc�B�t�|||||��dSr r�res     rr.zTitledHelpFormatter.__init__�r�rc�R�|�td�����d|�d�S)N�Usagez  r�)r�rBr|s  rr~z TitledHelpFormatter.format_usage�s+��!�0�0��7���<�<�<�<�e�e�e�D�Drc�H�|�dd|jt|��z�d�S)Nr�z=-)r^r�r�s  rr�z"TitledHelpFormatter.format_heading�s)��$�W�W�d�4�:�&6��W���&E�&E�&E�F�Fr)rr�Nrr�r!rrrr�se�������#$�#%���	K�K�K�K�E�E�E�G�G�G�G�Grrc���|dd����dkrd}nB|dd����dkrd}|dd�pd}n|dd�dkrd}nd}|||��S)	NrO�0x��0b�0r%��
)�lower)�val�type�radixs   r�
_parse_numr��s���
�2�A�2�w�}�}���$������	�R�a�R������D�	 �	 ����!�"�"�g�n����	�R�a�R��C���������4��U���rc�,�t|t��Sr )r�rS)r�s r�
_parse_intr��s���c�3���r�integerzfloating-point�complex)rS�long�floatr�c��t|j\}}	||��S#t$r#tt	d��|||fz���wxYw)Nzoption %s: invalid %s value: %r)�_builtin_cvtr�rWrrB)r8r��value�cvt�whats     r�
check_builtinr��sr���v�{�+�K�S�$�G��s�5�z�z����G�G�G��
�/�0�0�C��u�3E�E�G�G�	G�G���s	�
"�-Ac��||jvr|Sd�tt|j����}t	td��|||fz���)NrHz.option %s: invalid choice: %r (choose from %s))�choicesrI�map�reprrrB)r8r�r�r�s    rrr�s^����������)�)�C��f�n�5�5�6�6���
�>�?�?��E�7�#�
$�%�%�	%r)�NO�DEFAULTc���eZdZ	gd�ZdZdZdZdZdZdZ	e
e
e
e
ed�Zd	Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeeeeeeegZ
d�ZeZd�Zd�Zd�Zd�Zd�Z d�Z!d	S)r)�actionr�r��default�nargs�constr��callback�
callback_args�callback_kwargsr�r�)
�store�store_const�
store_true�store_falser��append_const�countr�r��version)r�r�r�r�r�r�r)r�r�r�)r�r�)r�r�)�stringrSr�r�r��choice)rSr�r�r�rNc���g|_g|_|�|��}|�|��|�|��|jD]
}||���dSr )r�r��_check_opt_strings�_set_opt_strings�
_set_attrs�
CHECK_METHODS)rr��attrs�checkers    rr.zOption.__init__4s{���������&�&�t�,�,�����d�#�#�#�	
��������)�	�	�G��G�D�M�M�M�M�	�	rc�@�d�|D��}|std���|S)Nc��g|]}|�|��Sr!r!)r�r�s  rr�z-Option._check_opt_strings.<locals>.<listcomp>Ks��+�+�+��s�+��+�+�+rz+at least one option string must be supplied)�	TypeError)rr�s  rrzOption._check_opt_stringsGs4��,�+�t�+�+�+���	K��I�J�J�J��rc��|D]�}t|��dkrtd|z|���t|��dkrF|ddkr|ddkstd|z|���|j�|����|dd�dkr|ddkstd|z|���|j�|����dS)	NrOz>invalid option string %r: must be at least two characters longr�-r%zMinvalid short option string %r: must be of the form -x, (x any non-dash char)�--zGinvalid long option string %r: must start with --, followed by non-dash)r�rr�r�r�)rr�r�s   rrzOption._set_opt_stringsPs���	,�	,�C��3�x�x�!�|�|�!�;�=@�A�BF�H�H�H��S���Q����A��#�
�
�#�a�&�C�-�-�%�H�JM�N������ �'�'��,�,�,�,��A�a�C��D�(�(�S��V�s�]�]�%�C�EH�I�������&�&�s�+�+�+�+�%	,�	,rc�F�|jD]O}||vrt||||��||=�!|dkrt||t���>t||d���P|rGt|�����}tdd�|��z|���dS)Nr�zinvalid keyword arguments: %srH)�ATTRS�setattrr��sorted�keysrrI)rr	�attrs   rrzOption._set_attrses����J�	.�	.�D��u�}�}���d�E�$�K�0�0�0��$�K�K��9�$�$��D�$�
�3�3�3�3��D�$��-�-�-�-��	��5�:�:�<�<�(�(�E��/�$�)�)�E�2B�2B�B����
�	�	rc�r�|j�	d|_dS|j|jvrtd|jz|���dS)Nr�zinvalid action: %r)r��ACTIONSrrs r�
_check_actionzOption._check_actionxsD���;��!�D�K�K�K�
�[���
,�
,��2�T�[�@�$�G�G�G�-�
,rc�x�|j�)|j|jvr|j�	d|_dSd|_dSdSt	|jt��r|jj|_|jdkrd|_|j|jvrtd|jz|���|j|jvrtd|jz|���dS)Nrrr6zinvalid option type: %rz$must not supply a type for action %r)	r�r��ALWAYS_TYPED_ACTIONSr��
isinstancer�TYPESr�
TYPED_ACTIONSrs r�_check_typezOption._check_type~s����9���{�d�7�7�7��<�+� (�D�I�I�I�!)�D�I�I�I�
8�7��$�)�T�*�*�
/� �I�.��	��y�E�!�!�$��	��y��
�*�*�!�";�d�i�"G��N�N�N��{�$�"4�4�4�!�:�T�[�H�$�P�P�P�5�4rc�d�|jdkr�|j�td|���t|jtt
f��sKtdt
t|j�����d��dz|���dS|j�td|jz|���dS)Nrz/must supply a list of choices for type 'choice'z1choices must be a list of strings ('%s' supplied)�'r%z#must not supply choices for type %r)r�r�rr�tuple�listr6�splitrs r�
_check_choicezOption._check_choice�s����9�� � ��|�#�!�E�t�M�M�M����u�d�m�<�<�
C�!�G��$�t�|�,�,�-�-�3�3�C�8�8��;�<�=A�C�C�C�
C�
C��\�
%��5��	�A�4�I�I�
I�&�
%rc���|j|jvp|jdu}|j�S|rS|jr0|jddd��dd��|_dS|jdd|_dSdSdS)NrrOrrBr%)r��
STORE_ACTIONSr�r�r�r�r�)rr�s  r�_check_destzOption._check_dest�s����{�d�&8�8�-��y��,�	��9������
3� �O�A�.�q�r�r�2�:�:�3��D�D��	�	�	� �,�Q�/��2��	�	�	����rc�d�|j|jvr|j�td|jz|���dSdS)Nz*'const' must not be supplied for action %r)r��
CONST_ACTIONSr�rrs r�_check_constzOption._check_const�sF���;�d�0�0�0�T�Z�5K��<�t�{�J����
�1�0�5K�5Krc��|j|jvr|j�	d|_dSdS|j�td|jz|���dS)Nr%z*'nargs' must not be supplied for action %r)r�rr�rrs r�_check_nargszOption._check_nargs�s\���;�$�,�,�,��z�!���
�
�
�"�!�
�Z�
#��<�t�{�J����
�$�
#rc��|jdkr�t|j��std|jz|���|j�2t|jt��std|jz|���|j�2t|jt��std|jz|���dSdS|j�td|jz|���|j�td|���|j�td|���dS)Nr�zcallback not callable: %rz3callback_args, if supplied, must be a tuple: not %rz4callback_kwargs, if supplied, must be a dict: not %rz.callback supplied (%r) for non-callback optionz.callback_args supplied for non-callback optionz0callback_kwargs supplied for non-callback option)	r��callabler�rr�rr"r��dictrs r�_check_callbackzOption._check_callback�sQ���;�*�$�$��D�M�*�*�
G�!�/�$�-�?��G�G�G��"�.��t�1�5�9�9�/�!�I��(�)�*.�0�0�0��$�0��t�3�T�:�:�1�!�J��*�+�,0�2�2�2�1�0�0�0��}�(�!�D��m�$�%)�+�+�+��!�-�!�D�d�L�L�L��#�/�!�F��N�N�N�0�/rc�F�d�|j|jz��S)N�/)rIr�r�rs rr0zOption.__str__�s���x�x��(�4�?�:�;�;�;rc��|jduSr )r�rs rr�zOption.takes_value�s���y��$�$rc�D�|jr
|jdS|jdS�Nr)r�r�rs r�get_opt_stringzOption.get_opt_string�s'���?�	'��?�1�%�%��#�A�&�&rc�b�|j�|j��}|�|S||||��Sr )�TYPE_CHECKERr�r�)rr�r�r
s    r�check_valuezOption.check_value�s8���#�'�'��	�2�2���?��L��7�4��e�,�,�,rc����|�=�jdkr���|��St��fd�|D����SdS)Nr%c�<��g|]}���|����Sr!)r:)r��vr�rs  ��rr�z(Option.convert_value.<locals>.<listcomp>s)���F�F�F�1�d�.�.�s�A�6�6�F�F�Fr)r�r:r")rr�r�s`` r�
convert_valuezOption.convert_valuesY�������z�Q����'�'��U�3�3�3��F�F�F�F�F��F�F�F�G�G�G�	�rc�v�|�||��}|�|j|j||||��Sr )r>�take_actionr�r�)rr�r��valuesrQs     r�processzOption.processsG���"�"�3��.�.��
����K���C����@�@�	@rc�F�|dkrt|||���n�|dkrt|||j���ni|dkrt||d���nP|dkrt||d���n7|dkr+|�|g���|���n|dkr/|�|g���|j��n�|d	kr)t|||�|d
��dz��n�|dkr'|jpd
}|jpi}|j||||g|�Ri|��nu|dkr)|���|���nF|dkr)|�	��|���ntd|jz���dS)Nr�r�r�Tr�Fr�r�rrr%r�r!r�rzunknown action %r)rr��ensure_valuer�r�r�r��
print_help�exit�
print_versionrWr�)	rr�r�r�r�rArQ�args�kwargss	         rr@zOption.take_actions����W����F�D�%�(�(�(�(�
�}�
$�
$��F�D�$�*�-�-�-�-�
�|�
#�
#��F�D�$�'�'�'�'�
�}�
$�
$��F�D�%�(�(�(�(�
�x�
�
�����b�)�)�0�0��7�7�7�7�
�~�
%�
%�����b�)�)�0�0���<�<�<�<�
�w�
�
��F�D�&�"5�"5�d�A�">�">��"B�C�C�C�C�
�z�
!�
!��%�+��D��)�/�R�F��D�M�$��U�F�D�T�D�D�D�V�D�D�D�D�
�v�
�
��������K�K�M�M�M�M�
�y�
 �
 �� � �"�"�"��K�K�M�M�M�M��0�4�;�>�?�?�?��qr)"rr2r3rrr'rrr*rr�rr9rr.rrrrrr%r(r+r-r1r0r�__repr__r�r7r:r>rBr@r!rrrr�s��������*
�
�
�E�	�G��M�!�M�&��%�M�

D�E�$!.� -� -� -� ,�	��L� �M�
���&���,�,�,�*���&H�H�H�P�P�P�0I�I�I�
3�
3�
3�������N�N�N�8#� �"� �!�!�$�
&�M�<�<�<��H�%�%�%�'�'�'�-�-�-�H�H�H�
@�
@�
@�����rr�SUPPRESSHELP�
SUPPRESSUSAGEc�N�eZdZdd�Zd�ZeZd�Zd�Zd�Z	d�Z
d
d	�Zd
d
�Zd�Z
dS)rNc�d�|r+|���D]\}}t|||���dSdSr )�itemsr)rr�rr�s    rr.zValues.__init__9sP���	)�'�~�~�/�/�
)�
)���s���d�C�(�(�(�(�	)�	)�
)�
)rc�*�t|j��Sr )r6�__dict__rs rr0zValues.__str__>s���4�=�!�!�!rc��t|t��r|j|jkSt|t��r|j|kStSr )rrrQr0�NotImplemented)r�others  r�__eq__z
Values.__eq__CsH���e�V�$�$�	"��=�E�N�2�2�
��t�
$�
$�	"��=�E�)�)�!�!rc�j�	t|��D]!}||vr||}|�t|||���"dSr )�dirr)rr0r�dvals    r�_update_carefulzValues._update_carefulKsS��	���I�I�	.�	.�D��t�|�|��D�z���#��D�$��-�-�-��		.�	.rc�<�	|j�|��dSr )rQ�update)rr0s  r�
_update_loosezValues._update_looseXs%��	�
	
�
���T�"�"�"�"�"rc��|dkr|�|��dS|dkr|�|��dStd|z���)N�careful�loosezinvalid update mode: %r)rYr\rW)rr0�modes   r�_updatezValues._update`s^���9���� � ��&�&�&�&�&�
�W�_�_����t�$�$�$�$�$��6��=�>�>�>rr^c��t|��tj|}|�t	|��|��dSr )�
__import__�sys�modulesra�vars)r�modnamer`�mods    r�read_modulezValues.read_modulehs<���7�����k�'�"�����T�#�Y�Y��%�%�%�%�%rc��i}tt|�����|��|�||��dSr )�exec�open�readra)r�filenamer`rfs    r�	read_filezValues.read_filemsC�����T�(�^�^�
 �
 �
"�
"�D�)�)�)����T�4� � � � � rc��t||��rt||���t|||��t||��Sr )�hasattr�getattrr)rrr�s   rrDzValues.ensure_valuersE���t�T�"�"�	'�g�d�D�&9�&9�&A��D�$��&�&�&��t�T�"�"�"rr )r^)rr2r3r.r0rrJrUrYr\rarirorDr!rrrr7s�������)�)�)�)�
"�"�"��H�"�"�"�.�.�.�#�#�#�?�?�?�&�&�&�&�
!�!�!�!�
#�#�#�#�#rrc�p�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�ZdS)rc��|���||_|�|��|�|��dSr )�_create_option_list�option_class�set_conflict_handler�set_description)rrv�conflict_handlerr�s    rr.zOptionContainer.__init__�sM��
	
� � �"�"�"�(����!�!�"2�3�3�3����[�)�)�)�)�)rc�0�i|_i|_i|_dSr ��
_short_opt�	_long_optr�rs r�_create_option_mappingsz'OptionContainer._create_option_mappings�s����������
�
�
rc�N�|j|_|j|_|j|_dSr r{rgs  r�_share_option_mappingsz&OptionContainer._share_option_mappings�s%��!�+����)������
�
�
rc�@�|dvrtd|z���||_dS)N)�error�resolvez$invalid conflict_resolution value %r)rWry)r�handlers  rrwz$OptionContainer.set_conflict_handler�s0���.�.�.��C�g�M�N�N�N� '����rc��||_dSr �r�r�s  rrxzOptionContainer.set_description�s��&����rc��|jSr r�rs r�get_descriptionzOptionContainer.get_description�s����rc��	|`|`|`dSr r{rs r�destroyzOptionContainer.destroy�s��)��O��N��M�M�Mrc��g}|jD]-}||jvr"|�||j|f���.|jD]-}||jvr"|�||j|f���.|r�|j}|dkr0t
dd�d�|D����z|���|dkr�|D]�\}}|�d��r#|j�	|��|j|=n"|j�	|��|j|=|js&|js|j
j�	|����dSdSdS)Nr�z conflicting option string(s): %srHc��g|]
}|d��S)rr!)r��cos  rr�z3OptionContainer._check_conflict.<locals>.<listcomp>�s�� ?� ?� ?�2��A�� ?� ?� ?rr�r)r�r|r�r�r}ryrrI�
startswith�remove�	containerr�)rr8�
conflict_optsr�r��c_options      r�_check_conflictzOptionContainer._check_conflict�s����
��%�	B�	B�C��d�o�%�%��$�$�c�4�?�3�+?�%@�A�A�A���$�	A�	A�C��d�n�$�$��$�$�c�4�>�#�+>�%?�@�@�@���	H��+�G��'�!�!�)�6��i�i� ?� ?�� ?� ?� ?�@�@�A������I�%�%�'4�H�H�O�S�(��~�~�d�+�+�1� �+�2�2�3�7�7�7� �N�3�/�/� �,�3�3�C�8�8�8� �O�C�0�$�0�H�H�4G�H� �*�6�=�=�h�G�G�G��!	H�	H�&�%�H�Hrc�L�	t|dt��r|j|i|��}nTt|��dkr2|s0|d}t|t��std|z���ntd���|�|��|j�|��||_	|j
D]}||j|<�
|jD]}||j
|<�
|j�@|jt ur|j|j|j<n|j|jvrd|j|j<|S)Nrr%znot an Option instance: %r�invalid arguments)rr6rvr�rr
r�r�r�r�r�r|r�r}r�r�r�r�)rrHrIr8r�s     r�
add_optionzOptionContainer.add_option�sQ��	��d�1�g�s�#�#�	1�&�T�&��7��7�7�F�F�
��Y�Y�!�^�^�F�^��!�W�F��f�f�-�-�
G�� <�v� E�F�F�F�
G��/�0�0�0����V�$�$�$������'�'�'�����%�	*�	*�C�#)�D�O�C� � ��$�	)�	)�C�"(�D�N�3����;�"��~�Z�/�/�-3�^��
�f�k�*�*���D�M�1�1�-1��
�f�k�*��
rc�:�|D]}|�|���dSr )r�)rr�r8s   r�add_optionszOptionContainer.add_optionss0��!�	$�	$�F��O�O�F�#�#�#�#�	$�	$rc�j�|j�|��p|j�|��Sr )r|r�r}r@s  r�
get_optionzOptionContainer.get_options2����#�#�G�,�,�,���"�"�7�+�+�	-rc�&�||jvp||jvSr )r|r}r@s  r�
has_optionzOptionContainer.has_options ���4�?�*�*��4�>�)�	+rc� �|j�|��}|�|j�|��}|�td|z���|jD]
}|j|=�|jD]
}|j|=�|jj�|��dS)Nzno such option %r)	r|r�r}rWr�r�r�r�r�)rr?r8r�s    r�
remove_optionzOptionContainer.remove_options�����$�$�W�-�-���>��^�'�'��0�0�F��>��0�7�:�;�;�;��%�	%�	%�C����$�$��$�	$�	$�C���s�#�#���$�+�+�F�3�3�3�3�3rc���|jsdSg}|jD]8}|jtur(|�|�|�����9d�|��S�Nrj)r�r�rr�r�rI)r�	formatterr�r8s    r�format_option_helpz"OptionContainer.format_option_helpsg����	��2����&�	?�	?�F��;�-�/�/��
�
�i�5�5�f�=�=�>�>�>���w�w�v���rc�P�|�|�����Sr )r�r��rr�s  rr�z"OptionContainer.format_description(s"���+�+�D�,@�,@�,B�,B�C�C�Crc���g}|jr(|�|�|����|jr(|�|�|����d�|��S)Nr�)r�r�r�r�r�rI�rr�r�s   r�format_helpzOptionContainer.format_help+so������	>��M�M�$�1�1�)�<�<�=�=�=���	>��M�M�$�1�1�)�<�<�=�=�=��y�y�� � � rN)rr2r3r.r~r�rwrxr�r�r�r�r�r�r�r�r�r�r�r!rrrrxs�������<	*�	*�	*����(�(�(�(�(�(�
'�'�'� � � ����H�H�H�6���<$�$�$�-�-�-�+�+�+�4�4�4� ���D�D�D�!�!�!�!�!rrc�.�eZdZdd�Zd�Zd�Zd�Zd�ZdS)rNc�p�||_t�||j|j|��||_dSr )rQrr.rvry�title)rrQr�r�s    rr.zOptionGroup.__init__6s>������ � ��&�%�v�'>��	M�	M�	M���
�
�
rc�H�g|_|�|j��dSr )r�r�rQrs rruzOptionGroup._create_option_list<s&������#�#�D�K�0�0�0�0�0rc��||_dSr )r�)rr�s  r�	set_titlezOptionGroup.set_title@s
����
�
�
rc�@�	t�|��|`dSr )rr�r�rs rr�zOptionGroup.destroyCs%��)�����%�%�%����rc���|�|j��}|���|t�||��z
}|���|Sr )r�r�rurr�rwr�s   rr�zOptionGroup.format_helpJsZ���)�)�$�*�5�5���������/�-�-�d�I�>�>�>���������
rr )rr2r3r.rur�r�r�r!rrrr4sd����������1�1�1�����������rrc
��eZdZ	gZddedddddddf
d�Zd�Zd�Zd�Zd�Z	d*d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd+d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd,d �Z d!�Z!d"�Z"d-d#�Z#d$�Z$d-d%�Z%d-d&�Z&d'�Z'd-d(�Z(d-d)�Z)dS).r	Nr�Tc�h�t�||||��|�|��|	|_||_d|_d|_|�t��}||_|j�	|��|
|_
|�||���|���dS)NT)�add_help)
rr.�	set_usage�progr�allow_interspersed_args�process_default_valuesrr�rhr��_populate_option_list�_init_parsing_state)rr}r�rvrryr�r��add_help_optionr�r�s           rr.zOptionParser.__init__�s���	� � ��,� 0�+�	?�	?�	?����u������	����'+��$�&*��#���-�/�/�I�"�����!�!�$�'�'�'����	
�"�"�;�,;�	#�	=�	=�	=�	
� � �"�"�"�"�"rc��	t�|��|jD]}|����|`|`|`dSr )rr�r�r�r�)rr�s  rr�zOptionParser.destroy�sS��	�	����%�%�%��'�	�	�E��M�M�O�O�O�O������N�N�Nrc�J�g|_g|_|���dSr )r�r�r~rs rruz OptionParser._create_option_list�s*���������$�$�&�&�&�&�&rc�R�|�dddtd�����dS)Nz-hz--helpr�zshow this help message and exit�r�r��r�rBrs r�_add_help_optionzOptionParser._add_help_option�s?������h�%��@�A�A�	�	C�	C�	C�	C�	Crc�P�|�ddtd�����dS)Nz	--versionrz&show program's version number and exitr�r�rs r�_add_version_optionz OptionParser._add_version_option�s=������(��G�H�H�	�	J�	J�	J�	J�	Jrc���|jr|�|j��|r|�|��|jr|���|r|���dSdSr )�standard_option_listr�rr�r�)rr�r�s   rr�z"OptionParser._populate_option_list�s����$�	8����T�6�7�7�7��	*����[�)�)�)��<�	'��$�$�&�&�&��	$��!�!�#�#�#�#�#�	$�	$rc�0�d|_d|_d|_dSr )�rargs�largsrArs rr�z OptionParser._init_parsing_state�s����
���
�����rc���|�td��|_dS|tur	d|_dS|����d��r|dd�|_dS||_dS)Nz%prog [options]zusage: �)rBr}rr�r�r|s  rr�zOptionParser.set_usage�sm���=��,�-�-�D�J�J�J�
�n�
$�
$��D�J�J�J�
�[�[�]�]�
%�
%�i�
0�
0�	��q�r�r��D�J�J�J��D�J�J�Jrc��	d|_dS)NT�r�rs r�enable_interspersed_argsz%OptionParser.enable_interspersed_args�s��	$�
(,��$�$�$rc��	d|_dS)NFr�rs r�disable_interspersed_argsz&OptionParser.disable_interspersed_argss��	�
(-��$�$�$rc��||_dSr )r�)rrBs  r�set_process_default_valuesz'OptionParser.set_process_default_valuess��&-��#�#�#rc��||j|<dSr )r�)rr�r�s   r�set_defaultzOptionParser.set_defaults��#��
�d���rc�:�|j�|��dSr )r�r[)rrIs  r�set_defaultszOptionParser.set_defaultss���
���V�$�$�$�$�$rc�l�|jdd�}|jD]}|�|j���|Sr )r�r�r�)r�optionsr�s   r�_get_all_optionszOptionParser._get_all_optionssB���"�1�1�1�%���'�	.�	.�E��N�N�5�,�-�-�-�-��rc�x�|jst|j��S|j���}|���D]c}|�|j��}t|t��r2|�	��}|�
||��||j<�dt|��Sr )r�rr��copyr�r�r�rr6r7r:)rr�r8r�r?s     r�get_default_valueszOptionParser.get_default_valuess����*�	)��$�-�(�(�(��=�%�%�'�'���+�+�-�-�	M�	M�F��l�l�6�;�/�/�G��'�3�'�'�
M� �/�/�1�1��(.�(:�(:�7�G�(L�(L����%���h���rc�j�t|dt��rt|g|�Ri|��}nlt|��dkrJ|sH|d}t|t��st	d|z���|j|urt
d���nt	d���|j�|��|S)Nrr%znot an OptionGroup instance: %rz"invalid OptionGroup (wrong parser)r�)	rr6rr�r
rQrWr�r�)rrHrIr�s    r�add_option_groupzOptionParser.add_option_group+s����d�1�g�s�#�#�		1���6�t�6�6�6�v�6�6�E�E�
��Y�Y�!�^�^�F�^���G�E��e�[�1�1�
K�� A�E� I�J�J�J��|�4�'�'� �!E�F�F�F�(��/�0�0�0���!�!�%�(�(�(��rc��|j�|��p|j�|��}|r|j|ur|jSdSr )r|r�r}r�)rr?r8s   r�get_option_groupzOptionParser.get_option_group;sU���/�%�%�g�.�.�.��.�$�$�W�-�-�	��	$�f�&�d�2�2��#�#��trc�B�|�tjdd�S|dd�Sr$)rd�argv)rrHs  r�	_get_argszOptionParser._get_argsEs$���<��8�A�B�B�<������7�Nrc�p�	|�|��}|�|���}||_gx|_}||_	|�|||��}n@#ttf$r,}|�t|����Yd}~nd}~wwxYw||z}|�
||��Sr )r�r�r�r�rA�
_process_argsrrr�r6�check_values)rrHrAr�r��stop�errs       r�
parse_argszOptionParser.parse_argsKs���	����t�$�$���>��,�,�.�.�F���
����
�U����	!��%�%�e�U�F�;�;�D�D��� 0�1�	!�	!�	!��J�J�s�3�x�x� � � � � � � � �����	!�����u�}��� � ���.�.�.s�A�B�."B�Bc��	||fSr r!)rrArHs   rr�zOptionParser.check_valuesrs��		���~�rc�8�	|r�|d}|dkr|d=dS|dd�dkr|�||��nZ|dd�dkr*t|��dkr|�||��n"|jr|�|��|d=ndS|��dSdS)NrrrOr%r)�_process_long_optr��_process_short_optsr�r�)rr�r�rA�args     rr�zOptionParser._process_argss���	��	���(�C��d�{�{��!�H����Q�q�S��T�!�!��&�&�u�f�5�5�5�5��R�a�R��C���C��H�H�q�L�L��(�(���7�7�7�7��-�
����S�!�!�!��!�H�H���'�	�	�	�	�	rc�.�	t||j��Sr )�
_match_abbrevr})rr�s  r�_match_long_optzOptionParser._match_long_opt�s��	��S�$�.�1�1�1rc��|�d��}d|vr2|�dd��\}}|�d|��d}n|}d}|�|��}|j|}|���r~|j}t|��|kr+|�tdd|��||d�z��nc|dkr|�d��}	nGt|d|���}	|d|�=n*|r&|�td	��|z��nd}	|�||	||��dS)
Nrrqr%TF�.%(option)s option requires %(number)d argument�/%(option)s option requires %(number)d arguments�r8�numberz%s option does not take a value)
�popr$�insertr�r}r�r�r�r�rr"rBrB)
rr�rAr�r��next_arg�had_explicit_valuer8r�r�s
          rr�zOptionParser._process_long_opt�sv���i�i��l�l���#�:�:�!�i�i��Q�/�/�O�S�(��L�L��H�%�%�%�!%����C�!&���"�"�3�'�'�����$�������	��L�E��5�z�z�E�!�!��
�
�8�D�E����),�u�=�=�>�?�?�?�?��!����	�	�!������e�A�e�G�n�-�-���!�E�'�N�N�
�	��J�J�q�:�;�;�c�A�B�B�B�B��E����s�E�6�4�0�0�0�0�0rc��|�d��}d}d}|dd�D�]}d|z}|j�|��}|dz
}|st|���|���r�|t|��kr |�d||d���d}|j}	t|��|	kr+|�tdd|	��||	d�z��n;|	dkr|�d��}
nt|d|	���}
|d|	�=nd}
|�||
||��|rdS��dS)	NrFr%rTr�r�r�)r�r|r�rr�r�r�r�r�rr"rB)rr�rAr�r��i�chr�r8r�r�s           rr�z OptionParser._process_short_opts�s����i�i��l�l����
���a�b�b�'� 	� 	�B���(�C��_�(�(��-�-�F�
��F�A��
*�$�S�)�)�)��!�!�#�#�
��s�3�x�x�<�<��L�L��C����G�,�,�,��D�����u�:�:��%�%��J�J�x�H�I�� � �-0�5�!A�!A� B�C�C�C�C��a�Z�Z�!�I�I�a�L�L�E�E�!�%��%��.�1�1�E��a��g������N�N�3��v�t�4�4�4��
����
�? 	� 	rc�|�|j�/tj�tjd��S|jSr6)r�rT�path�basenamerdr�rs r�
get_prog_namezOptionParser.get_prog_names.���9���7�#�#�C�H�Q�K�0�0�0��9�rc�R�|�d|�����S)Nz%prog)r�r�)r�ss  r�expand_prog_namezOptionParser.expand_prog_names"���y�y��$�"4�"4�"6�"6�7�7�7rc�6�|�|j��Sr )rr�rs rr�zOptionParser.get_descriptions���$�$�T�%5�6�6�6rrc�p�|rtj�|��tj|��dSr )rd�stderr�writerF)r�statusr,s   rrFzOptionParser.exits6���	"��J���S�!�!�!��������rc��	|�tj��|�d|����d|�d���dS)NrOz	: error: r�)�print_usagerdrrFr�r-s  rr�zOptionParser.errorsT��	�	
�����$�$�$��	�	�!�$�*<�*<�*>�*>�*>�*>����D�E�E�E�E�Erc�x�|jr2|j�|�|j����SdSr�)r}r�r~rrs r�	get_usagezOptionParser.get_usage#s@���:�	��>�.�.��%�%�d�j�1�1�3�3�
3��2rc�`�	|jr%t|���|���dSdS�N)�file)r}�printr
�rr
s  rrzOptionParser.print_usage*s@��	��:�	/��$�.�.�"�"��.�.�.�.�.�.�	/�	/rc�H�|jr|�|j��SdSr�)rrrs r�get_versionzOptionParser.get_version6s'���<�	��(�(���6�6�6��2rc�`�	|jr%t|���|���dSdSr)rrrrs  rrGzOptionParser.print_version<sB��	��<�	1��$�"�"�$�$�4�0�0�0�0�0�0�	1�	1rc�X�|�|j}|�|��g}|�|�t	d������|���|jrC|�t�||����|�d��|j	D]?}|�|�
|����|�d���@|���d�|dd���S)N�Optionsr�rjr�)
r�r�r�r�rBrur�rr�r�r�rwrI)rr�r�r�s    rr�zOptionParser.format_option_helpGs������I��&�&�t�,�,�,����
�
�i�.�.�q��|�|�<�<�=�=�=���������	 ��M�M�/�<�<�T�9�M�M�N�N�N��M�M�$�����'�	 �	 �E��M�M�%�+�+�I�6�6�7�7�7��M�M�$������������w�w�v�c�r�c�{�#�#�#rc�6�|�|j��Sr )r�r�r�s  rr�zOptionParser.format_epilogXs���&�&�t�{�3�3�3rc��|�|j}g}|jr*|�|���dz��|jr+|�|�|��dz��|�|�|����|�|�|����d�|��Sr�)	r�r}r�r
r�r�r�r�rIr�s   rr�zOptionParser.format_help[s�������I����:�	3��M�M�$�.�.�*�*�T�1�2�2�2���	E��M�M�$�1�1�)�<�<�t�C�D�D�D��
�
�d�-�-�i�8�8�9�9�9��
�
�d�(�(��3�3�4�4�4��w�w�v���rc�r�	|�tj}|�|�����dSr )rd�stdoutrr�rs  rrEzOptionParser.print_helpgs9��	�
�<��:�D��
�
�4�#�#�%�%�&�&�&�&�&r)T)NN)rNr )*rr2r3r�rr.r�rur�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�rFr�r
rrrGr�r�r�rEr!rrr	r	Rs�������B�H���!�$��")�!��!%���#�#�#�#�D���$'�'�'�
C�C�C�
J�J�J�
$�$�$�$����	�	�	�,�,�,�-�-�-�.�.�.�$�$�$�%�%�%���� � � �"��� ������%/�%/�%/�%/�N������f2�2�2�"1�"1�"1�H$�$�$�R���8�8�8�7�7�7�����
F�F�F����
/�
/�
/�
/����	1�	1�	1�	1�$�$�$�$�"4�4�4�
�
�
�
�'�'�'�'�'�'rr	c����	�|vr�S�fd�|���D��}t|��dkr|dS|st����|���t	�|���)Nc�>��g|]}|�����|��Sr!)r�)r��wordrs  �rr�z!_match_abbrev.<locals>.<listcomp>�s9���0�0�0�$� �O�O�A�.�.�0��0�0�0rr%r)rr�r�sortrD)r�wordmaprFs`  rr�r�ts�����	�G�|�|���0�0�0�0�'�,�,�.�.�0�0�0�
��}����"�"� ��#�#��	9� ��#�#�#�
��� � � �&�q�-�8�8�8r)&�__version__�__all__�
__copyright__rdrTr�rrr�ImportErrorrB�	Exceptionr
rrrrrDr
rrr�r�r�r�r�r�rr�rrrrrrr	r�rr!rr�<module>r#s����.������$�
�@������������J�J�J�	�)�)�)�)�)�)�)�)�)��������������	�����������Y���������=���� �����;����
�����
����6�6�6�6�6�m�6�6�6�
A�
A�
A�
A�
A�N�
A�
A�
A�M�M�M�M�M�M�M�M�^?�?�?�?�?�]�?�?�?�&G�G�G�G�G�=�G�G�G�&��� � � �%�a�a�	�l�l�3�%�q�q��|�|�4�!�1�1�%5�#6�#6�7�%�q�q��|�|�4�7�7��
G�G�G�%�%�%��
�n�n�n�n�n�n�n�n�f"�
�#��>#�>#�>#�>#�>#�>#�>#�>#�By!�y!�y!�y!�y!�y!�y!�y!�x�����?����<]'�]'�]'�]'�]'�O�]'�]'�]'�D9�9�9�:���s�#�1�1