AlkantarClanX12

Your IP : 18.116.85.102


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/optparse.cpython-312.pyc

�

�Q�f�����dZdZgd�ZdZddlZddlZddlZd�Z	ddlmZm	Z	eZGd
�de�Z
Gd�d
e
�ZGd�de�ZGd�de
�ZGd�de
�ZGd�de�ZGd�d�ZGd�de�ZGd�de�Zd�Zd�Zeed�feed�feed�feed �fd!�Zd"�Zd#�Zd$ZGd%�d&�Zd'Zd(Z Gd)�d*�Z!Gd+�d,�Z"Gd-�d.e"�Z#Gd/�d0e"�Z$d1�Z%eZ&y#e
$r	d�Zd	�Z	Y��wxYw)2a�A powerful, extensible, and easy-to-use option parser.

By Greg Ward <gward@python.net>

Originally distributed as Optik.

For support, use the optik-users@lists.sourceforge.net mailing list
(http://lists.sourceforge.net/lists/listinfo/optik-users).

Simple usage example:

   from optparse import OptionParser

   parser = OptionParser()
   parser.add_option("-f", "--file", dest="filename",
                     help="write report to FILE", metavar="FILE")
   parser.add_option("-q", "--quiet",
                     action="store_false", dest="verbose", default=True,
                     help="don't print status messages to stdout")

   (options, args) = parser.parse_args()
z1.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�L�d|jjt|�|fzS)Nz<%s at 0x%x: %s>)�	__class__�__name__�id��selfs �//opt/alt/python312/lib64/python3.12/optparse.py�_reprrOs"������!8�!8�"�T�(�D� I�I�I�)�gettext�ngettextc��|S�N�)�messages rrr\s���rc��|dk(r|S|S�N�r!)�singular�plural�ns   rrr_s����6��O��
rc��eZdZd�Zd�Zy)r
c��||_yr ��msg�rr,s  r�__init__zOptParseError.__init__hs	����rc��|jSr r+rs r�__str__zOptParseError.__str__ks���x�x�rN)r�
__module__�__qualname__r.r0r!rrr
r
gs���rr
c��eZdZdZd�Zd�Zy)rz]
    Raised if an Option instance is created with invalid or
    inconsistent arguments.
    c�2�||_t|�|_yr )r,�str�	option_id)rr,�options   rr.zOptionError.__init__us������V���rc�j�|jrd|j�d|j��S|jS)Nzoption z: )r6r,rs rr0zOptionError.__str__ys%���>�>�&*�n�n�d�h�h�?�?��8�8�OrN�rr1r2�__doc__r.r0r!rrrros���
%�rrc��eZdZdZy)rzE
    Raised if conflicting options are added to an OptionParser.
    N�rr1r2r:r!rrrrs��rrc��eZdZdZy)rzS
    Raised if an invalid option value is encountered on the command
    line.
    Nr<r!rrrr�s��rrc��eZdZdZd�Zd�Zy)rzB
    Raised if an invalid option is seen on the command line.
    c��||_yr )�opt_str�rr@s  rr.zBadOptionError.__init__�s	����rc�2�td�|jzS)Nzno such option: %s)�_r@rs rr0zBadOptionError.__str__�s���%�&����5�5rNr9r!rrrr�s����6rrc��eZdZdZd�Zd�Zy)�AmbiguousOptionErrorzD
    Raised if an ambiguous option is seen on the command line.
    c�>�tj||�||_yr )rr.�
possibilities)rr@rGs   rr.zAmbiguousOptionError.__init__�s������g�.�*��rc�h�td�|jdj|j�fzS)Nzambiguous option: %s (%s?)�, )rCr@�joinrGrs rr0zAmbiguousOptionError.__str__�s2���.�/��<�<����4�+=�+=�!>�?�@�	ArNr9r!rrrErE�s���+�ArrEc�n�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zy)r
a�
    Abstract base class for formatting option help.  OptionParser
    instances should use one of the HelpFormatter subclasses for
    formatting help; by default IndentedHelpFormatter is used.

    Instance attributes:
      parser : OptionParser
        the controlling OptionParser instance
      indent_increment : int
        the number of columns to indent per nesting level
      max_help_position : int
        the maximum starting column for option help text
      help_position : int
        the calculated starting column for option help text;
        initially the same as the maximum
      width : int
        total number of columns for output (pass None to constructor for
        this value to be taken from the $COLUMNS environment variable)
      level : int
        current indentation level
      current_indent : int
        current indentation level (in columns)
      help_width : int
        number of columns available for option help text (calculated)
      default_tag : str
        text to replace with each option's default value, "%default"
        by default.  Set to false value to disable default value expansion.
      option_strings : { Option : str }
        maps Option instances to the snippet of help text explaining
        the syntax of that option, e.g. "-h, --help" or
        "-fFILE, --file=FILE"
      _short_opt_fmt : str
        format string controlling how short options with values are
        printed in help text.  Must be either "%s%s" ("-fFILE") or
        "%s %s" ("-f FILE"), because those are the two syntaxes that
        Optik supports.
      _long_opt_fmt : str
        similar but for long options; must be either "%s %s" ("--file FILE")
        or "%s=%s" ("--file=FILE").
    �nonec�d�d|_||_|�"	ttjd�}|dz}||_t|t|dz
|dz��x|_
|_d|_d|_
d|_||_d|_i|_d|_d|_y#t
tf$rd}Y��wxYw)	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�rrSr]rYras     rr.zHelpFormatter.__init__�s���
��� 0����=�
��B�J�J�y�1�2��
�Q�J�E���
��%�s�5�2�:�7G�!�7K�'L�M�	N���T�3������
����&���%��� ���%���$�����j�)�
���
�s�B�B/�.B/c��||_yr )rR�rrRs  r�
set_parserzHelpFormatter.set_parser�s	����rc�B�|dvrtd|z��d|zdz|_y)N)�� z/invalid metavar delimiter for short options: %r�%s)rXrd�r�delims  r�set_short_opt_delimiterz%HelpFormatter.set_short_opt_delimiter�s2���	�!��A�E�I�K�
K�"�U�l�T�1��rc�B�|dvrtd|z��d|zdz|_y)N)�=rlz.invalid metavar delimiter for long options: %rrm)rXrerns  r�set_long_opt_delimiterz$HelpFormatter.set_long_opt_delimiter�s2���
�"��@�5�H�J�
J�!�E�\�D�0��rc�l�|xj|jz
c_|xjdz
c_yr$�r^rSr_rs r�indentzHelpFormatter.indent�s&�����t�4�4�4���
�
�a��
rc��|xj|jzc_|jdk\sJd��|xjdzc_y)NrzIndent decreased below 0.r%rurs r�dedentzHelpFormatter.dedent�s@�����t�4�4�4���"�"�a�'�D�)D�D�'��
�
�a��
rc��td���Nzsubclasses must implement��NotImplementedError�r�usages  r�format_usagezHelpFormatter.format_usage����!�"=�>�>rc��td��rzr{�r�headings  r�format_headingzHelpFormatter.format_headingr�rc��t|j|jz
d�}d|jz}tj||||��S)z�
        Format a paragraph of free-form text for inclusion in the
        help output at the current indentation level.
        �rl)�initial_indent�subsequent_indent)r[rYr^�textwrap�fill)r�text�
text_widthrvs    r�_format_textzHelpFormatter._format_textsK��
����d�&9�&9�9�2�>�
��T�(�(�(���}�}�T�'�,2�/5�7�	7rc�0�|r|j|�dzSy�N�
rk�r��r�descriptions  r�format_descriptionz HelpFormatter.format_descriptions����$�$�[�1�D�8�8�rc�6�|rd|j|�zdzSyr�r�)r�epilogs  r�
format_epilogzHelpFormatter.format_epilogs#����$�+�+�F�3�3�d�:�:�rc�2�|j�|js|jS|jjj	|j
�}|tus|�|j}|jj|jt|��Sr )
rRrb�help�defaults�get�dest�
NO_DEFAULT�NO_DEFAULT_VALUE�replacer5)rr7�
default_values   r�expand_defaultzHelpFormatter.expand_defaultsv���;�;��d�&6�&6��;�;�����,�,�0�0����=�
��J�&�-�*?� �1�1�M��{�{�"�"�4�#3�#3�S��5G�H�Hrc	�t�g}|j|}|j|jz
dz
}t|�|kDrd|jd|fz}|j}nd|jd||fz}d}|j	|�|j
r~|j
|�}tj||j�}|j	d|d|dfz�|j|ddD�cgc]}d|jd|fz��c}�n|ddk7r|j	d�dj|�Scc}w)	NrPz%*s%s
rkz	%*s%-*s  rr%���r�)rcr\r^�len�appendr�r�r��wrapr`�extendrJ)	rr7�result�opts�	opt_width�indent_first�	help_text�
help_lines�lines	         r�
format_optionzHelpFormatter.format_option(s=�����"�"�6�*���&�&��)<�)<�<�q�@�	��t�9�y� ��� 3� 3�R��>�>�D��-�-�L��$�"5�"5�r�9�d�!K�K�D��L��
�
�d���;�;��+�+�F�3�I�!���y�$�/�/�B�J��M�M�)�|�R��A��&G�G�H��M�M�'1�!�"�~�7�'5�t�%��(:�(:�B��'E�E�'5�7�
8�
�"�X��
��M�M�$���w�w�v����	7s�*D5c��|j�d}|jD]D}|j|�}||j|<t	|t|�|jz�}�F|j�|jD]U}|jD]D}|j|�}||j|<t	|t|�|jz�}�F�W|j�|j�t|dz|j�|_t	|j|jz
d�|_
y)NrrPr�)rv�option_list�format_option_stringsrcr[r�r^�
option_groupsrxrZr]r\rYr`)rrR�max_len�opt�strings�groups      r�store_option_stringsz"HelpFormatter.store_option_stringsKs�����
����%�%�C��0�0��5�G�'.�D����$��'�3�w�<�$�2E�2E�#E�F�G�&�	
���
��)�)�E��(�(���4�4�S�9��+2��#�#�C�(��g�s�7�|�d�6I�6I�'I�J��)�*�
	
���
����
� ��1��d�.D�.D�E����d�j�j�4�+=�+=�=�r�B��rc��|j�ry|jxs|jj�}|jD�cgc]}|j
||fz��}}|jD�cgc]}|j||fz��}}n|j}|j}|jr||z}n||z}dj|�Scc}wcc}w)z@Return a comma-separated list of option strings & metavariables.rI)
�takes_value�metavarr��upper�_short_optsrd�
_long_optsrerarJ)rr7r��sopt�
short_opts�lopt�	long_optsr�s        rr�z#HelpFormatter.format_option_strings]s��������n�n�;����(9�(9�(;�G�&,�&8�&8�:�&8�d��-�-��w��?�&8�
�:�&,�%6�%6�8�%6�T��+�+�t�W�o�=�%6�
�8� �+�+�J��)�)�I�����	�)�D��z�)�D��y�y�����:��8s�C
�/CN)rr1r2r:r�r.rirprsrvrxrr�r�r�r�r�r�r�r�r!rrr
r
�s^��'�R��%�2�2�1���
?�?�
7���I�!�FC�$rr
c�,�eZdZdZ				dd�Zd�Zd�Zy)rz.Format help with indented section bodies.
    Nc�6�tj|||||�yr �r
r.rfs     rr.zIndentedHelpFormatter.__init__t� ��
	����"�$5�u�k�	Krc��td�|zS)Nz
Usage: %s
)rCr}s  rrz"IndentedHelpFormatter.format_usage|s�����%�'�'rc�&�d|jd|fzS)Nz%*s%s:
rk)r^r�s  rr�z$IndentedHelpFormatter.format_headings���T�0�0�"�g�>�>�>r)rP�Nr%�rr1r2r:r.rr�r!rrrrps%���#$�#%���	K�(�?rrc�,�eZdZdZ				dd�Zd�Zd�Zy)rz1Format help with underlined section headers.
    Nc�6�tj|||||�yr r�rfs     rr.zTitledHelpFormatter.__init__�r�rc�B�|jtd���d|�d�S)N�Usagez  r�)r�rCr}s  rrz TitledHelpFormatter.format_usage�s��!�0�0��7��<�e�D�Drc�D�|�dd|jt|�z�d�S)Nr�z=-)r_r�r�s  rr�z"TitledHelpFormatter.format_heading�s��$�d�4�:�:�&6��W��&E�F�Fr)rr�Nrr�r!rrrr�s'���#$�#%���	K�E�Grrc��|ddj�dk(rd}n/|ddj�dk(rd}|ddxsd}n
|dddk(rd}nd}|||�S)	NrP�0x��0b�0r%��
)�lower)�val�type�radixs   r�
_parse_numr��sg��
�2�A�w�}�}��$����	�R�a�����D�	 ����!�"�g�n���	�R�a��C��������U��rc�"�t|t�Sr )r�rT)r�s r�
_parse_intr��s���c�3��r�integerzfloating-point�complex)rT�long�floatr�c��t|j\}}	||�S#t$rtt	d�|||fz��wxYw)Nzoption %s: invalid %s value: %r)�_builtin_cvtr�rXrrC)r7r��value�cvt�whats     r�
check_builtinr��sY���v�{�{�+�K�S�$�G��5�z����G��
�/�0�C��u�3E�E�G�	G�G�s	� �$Ac��||jvr|Sdjtt|j��}t	td�|||fz��)NrIz.option %s: invalid choice: %r (choose from %s))�choicesrJ�map�reprrrC)r7r�r�r�s    rrr�sQ����������)�)�C��f�n�n�5�6���
�>�?��E�7�#�
$�%�	%r)�NO�DEFAULTc���eZdZdZgd�ZdZdZdZdZdZ	dZ
eeeeed	�Z
d
Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeeeeeeegZd�ZeZd�Zd�Zd�Zd�Z d�Z!d�Z"y
)rar
    Instance attributes:
      _short_opts : [string]
      _long_opts : [string]

      action : string
      type : string
      dest : string
      default : any
      nargs : int
      const : any
      choices : [string]
      callback : function
      callback_args : (any*)
      callback_kwargs : { string : any }
      help : string
      metavar : string
    )�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�)�stringrTr�r�r��choice)rTr�r�r�r�Nc��g|_g|_|j|�}|j|�|j	|�|j
D]
}||��yr )r�r��_check_opt_strings�_set_opt_strings�
_set_attrs�
CHECK_METHODS)rr��attrs�checkers    rr.zOption.__init__4sX���������&�&�t�,�����d�#�	
������)�)�G��D�M�*rc�N�|D�cgc]}|s�|��	}}|std��|Scc}w)Nz+at least one option string must be supplied)�	TypeError�rr�r�s   rrzOption._check_opt_stringsGs3�� $�+�t��s��t��+���I�J�J����,s�"�"c�R�|D]�}t|�dkrtd|z|��t|�dk(r;|ddk(r|ddk7std|z|��|jj|��i|dddk(r|ddk7std|z|��|jj|���y)	NrPz>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�rs   rrzOption._set_opt_stringsPs����C��3�x�!�|�!�;�=@�A�BF�H�H��S��Q���A��#�
�#�a�&�C�-�%�H�JM�N����� � �'�'��,��A�a��D�(�S��V�s�]�%�C�EH�I�������&�&�s�+�%rc��|jD]>}||vrt||||�||=�|dk(rt||t��2t||d��@|r7t|j	��}tddj
|�z|��y)Nr�zinvalid keyword arguments: %srI)�ATTRS�setattrr��sorted�keysrrJ)rr�attrs   rrzOption._set_attrses����J�J�D��u�}���d�E�$�K�0��$�K��9�$��D�$�
�3��D�$��-����5�:�:�<�(�E��/�$�)�)�E�2B�B���
�rc��|j�d|_y|j|jvrtd|jz|��y)Nr�zinvalid action: %r)r��ACTIONSrrs r�
_check_actionzOption._check_actionxs?���;�;��!�D�K�
�[�[����
,��2�T�[�[�@�$�G�G�-rc���|j�5|j|jvr|j�d|_yd|_yyt	|jt�r|jj
|_|jdk(rd|_|j|jvrtd|jz|��|j|jvrtd|jz|��y)Nr�r�r5zinvalid 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�9���{�{�d�7�7�7��<�<�+� (�D�I�!)�D�I�
8��$�)�)�T�*� �I�I�.�.��	��y�y�E�!�$��	��y�y��
�
�*�!�";�d�i�i�"G��N�N��{�{�$�"4�"4�4�!�:�T�[�[�H�$�P�P�5rc�X�|jdk(rv|j�td|��t|jtt
f�s=tdt
t|j��jd�dz|��y|j�td|jz|��y)Nr�z/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�listr5�splitrs r�
_check_choicezOption._check_choice�s����9�9�� ��|�|�#�!�E�t�M�M�����u�d�m�<�!�G��$�t�|�|�,�-�3�3�C�8��;�<�=A�C�C�=��\�\�
%��5��	�	�A�4�I�
I�&rc�
�|j|jvxs|jdu}|j�O|rL|jr(|jdddjdd�|_y|jdd|_yyy)NrrPr
rCr%)r��
STORE_ACTIONSr�r�r�r�r�)rr�s  r�_check_destzOption._check_dest�s����{�{�d�&8�&8�8�-��y�y��,�	��9�9������ �O�O�A�.�q�r�2�:�:�3��D��	� �,�,�Q�/��2��	�"-�rc��|j|jvr&|j�td|jz|��yy)Nz*'const' must not be supplied for action %r)r��
CONST_ACTIONSr�rrs r�_check_constzOption._check_const�sB���;�;�d�0�0�0�T�Z�Z�5K��<�t�{�{�J���
�6L�0rc��|j|jvr|j�d|_yy|j�td|jz|��y)Nr%z*'nargs' must not be supplied for action %r)r�rr�rrs r�_check_nargszOption._check_nargs�sU���;�;�$�,�,�,��z�z�!���
�"�
�Z�Z�
#��<�t�{�{�J���
�$rc�(�|jdk(r�t|j�std|jz|��|j�3t|jt�std|jz|��|j�4t|jt�std|jz|��yy|j�td|jz|��|j�td|��|j�td|��y)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�rrr��dictrs r�_check_callbackzOption._check_callback�s/���;�;�*�$��D�M�M�*�!�/�$�-�-�?��G�G��"�"�.��t�1�1�5�9�!�I��(�(�)�*.�0�0��$�$�0��t�3�3�T�:�!�J��*�*�+�,0�2�2�;�1��}�}�(�!�D��m�m�$�%)�+�+��!�!�-�!�D�d�L�L��#�#�/�!�F��N�N�0rc�R�dj|j|jz�S)N�/)rJr�r�rs rr0zOption.__str__�s ���x�x��(�(�4�?�?�:�;�;rc��|jduSr )r�rs rr�zOption.takes_value�s���y�y��$�$rc�V�|jr|jdS|jdS�Nr)r�r�rs r�get_opt_stringzOption.get_opt_string�s)���?�?��?�?�1�%�%��#�#�A�&�&rc�h�|jj|j�}|�|S||||�Sr )�TYPE_CHECKERr�r�)rr�r�rs    r�check_valuezOption.check_value�s5���#�#�'�'��	�	�2���?��L��4��e�,�,rc	��|�J|jdk(r|j||�St|D�cgc]}|j||���c}�Sycc}wr$)r�r5r)rr�r��vs    r�
convert_valuezOption.convert_valuesX�����z�z�Q���'�'��U�3�3���F��1�d�.�.�s�A�6��F�G�G�	��Gs�Ac�z�|j||�}|j|j|j||||�Sr )r8�take_actionr�r�)rr�r��valuesrRs     r�processzOption.processsB���"�"�3��.��
����K�K����C����@�	@rc���|dk(rt|||�y|dk(rt|||j�y|dk(rt||d�y|dk(rt||d�y|dk(r"|j|g�j|�y|dk(r,|j|g�j|j�y|d	k(r!t|||j|d
�dz�y|dk(r:|jxsd
}|j
xsi}|j||||g|��i|��y|dk(r!|j�|j�y|dk(r!|j�|j�ytd|jz��)Nr�r�r�Tr�Fr�r�r�rr%r�r!r�r�zunknown action %r)rr��ensure_valuer�r�r�r��
print_help�exit�
print_versionrXr�)	rr�r�r�r�r;rR�args�kwargss	         rr:zOption.take_actions����W���F�D�%�(�4�3�}�
$��F�D�$�*�*�-�0�/�|�
#��F�D�$�'�,�+�}�
$��F�D�%�(�(�'�x�
�����b�)�0�0��7�$�#�~�
%�����b�)�0�0����<� ��w�
��F�D�&�"5�"5�d�A�">��"B�C���z�
!��%�%�+��D��)�)�/�R�F��D�M�M�$��U�F�D�T�D�V�D���v�
������K�K�M��
�y�
 �� � �"��K�K�M���0�4�;�;�>�?�?r)#rr1r2r:r
rr"rrr%rr�rr4rr.rrrrrr r#r&r(r,r0r�__repr__r�r2r5r8r<r:r!rrrr�s����*
�E�	�G��M�!�M�&��%�M�

D�E�$!.� -� -� -� ,�	�L� �M�
�&�,�*�&H�P�0I�
3���N�8#� �"� �!�!�$�
&�M�<��H�%�'�-�H�
@�rr�SUPPRESSHELP�
SUPPRESSUSAGEc�L�eZdZdd�Zd�ZeZd�Zd�Zd�Z	d�Z
dd�Zdd	�Zd
�Z
y)
rNc�T�|r&|j�D]\}}t|||��yyr )�itemsr)rr�rr�s    rr.zValues.__init__9s+���'�~�~�/���s���d�C�(� 0�rc�,�t|j�Sr )r5�__dict__rs rr0zValues.__str__>s���4�=�=�!�!rc��t|t�r|j|jk(St|t�r|j|k(StSr )rrrKr+�NotImplemented)r�others  r�__eq__z
Values.__eq__Cs>���e�V�$��=�=�E�N�N�2�2�
��t�
$��=�=�E�)�)�!�!rc�X�t|�D]}||vs�||}|��t|||��y)z�
        Update the option values from an arbitrary dictionary, but only
        use keys from dict that already have a corresponding attribute
        in self.  Any keys in dict without a corresponding attribute
        are silently ignored.
        N)�dirr)rr+r�dvals    r�_update_carefulzValues._update_carefulKs4����I�D��t�|��D�z���#��D�$��-�	rc�:�|jj|�y)z�
        Update the option values from an arbitrary dictionary,
        using all keys from the dictionary regardless of whether
        they have a corresponding attribute in self or not.
        N)rK�update)rr+s  r�
_update_loosezValues._update_looseXs��	
�
�
���T�"rc�z�|dk(r|j|�y|dk(r|j|�ytd|z��)N�careful�loosezinvalid update mode: %r)rSrVrX)rr+�modes   r�_updatezValues._update`s>���9��� � ��&�
�W�_����t�$��6��=�>�>rc�v�t|�tj|}|jt	|�|�yr )�
__import__�sys�modulesr[�vars)r�modnamerZ�mods    r�read_modulezValues.read_modulehs*���7���k�k�'�"�����T�#�Y��%rc�r�i}tt|�j�|�|j||�yr )�exec�open�readr[)r�filenamerZr`s    r�	read_filezValues.read_filems,�����T�(�^�
 �
 �
"�D�)����T�4� rc�d�t||�rt||��
t|||�t||�Sr )�hasattr�getattrr)rrr�s   rr>zValues.ensure_valuers1���t�T�"�g�d�D�&9�&A��D�$��&��t�T�"�"rr )rX)rr1r2r.r0rrDrOrSrVr[rcrir>r!rrrr7s6��)�
"��H�"�.�#�?�&�
!�
#rrc�p�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zy)ra�
    Abstract base class.

    Class attributes:
      standard_option_list : [Option]
        list of standard options that will be accepted by all instances
        of this parser class (intended to be overridden by subclasses).

    Instance attributes:
      option_list : [Option]
        the list of Option objects contained by this OptionContainer
      _short_opt : { string : Option }
        dictionary mapping short option strings, eg. "-f" or "-X",
        to the Option instances that implement them.  If an Option
        has multiple short option strings, it will appear in this
        dictionary multiple times. [1]
      _long_opt : { string : Option }
        dictionary mapping long option strings, eg. "--file" or
        "--exclude", to the Option instances that implement them.
        Again, a given Option can occur multiple times in this
        dictionary. [1]
      defaults : { string : any }
        dictionary mapping option destination names to default
        values for each destination [1]

    [1] These mappings are common to (shared by) all components of the
        controlling OptionParser, where they are initially created.

    c�v�|j�||_|j|�|j|�yr )�_create_option_list�option_class�set_conflict_handler�set_description)rrp�conflict_handlerr�s    rr.zOptionContainer.__init__�s5��
	
� � �"�(����!�!�"2�3����[�)rc�.�i|_i|_i|_yr ��
_short_opt�	_long_optr�rs r�_create_option_mappingsz'OptionContainer._create_option_mappings�s����������
rc�j�|j|_|j|_|j|_yr rurhs  r�_share_option_mappingsz&OptionContainer._share_option_mappings�s)��!�+�+����)�)�������
rc�6�|dvrtd|z��||_y)N)�error�resolvez$invalid conflict_resolution value %r)rXrs)r�handlers  rrqz$OptionContainer.set_conflict_handler�s$���.�.��C�g�M�N�N� '��rc��||_yr �r�r�s  rrrzOptionContainer.set_description�s
��&��rc��|jSr r�rs r�get_descriptionzOptionContainer.get_description�s�����rc��|`|`|`y�zsee OptionParser.destroy().Nrurs r�destroyzOptionContainer.destroy�s���O��N��Mrc
��g}|jD]1}||jvs�|j||j|f��3|jD]1}||jvs�|j||j|f��3|r�|j
}|dk(r/t
ddj|D�cgc]}|d��	c}�z|��|dk(r�|D]�\}}|jd�r)|jj|�|j|=n(|jj|�|j|=|jr�u|jr��|jjj|���yyycc}w)Nr|z conflicting option string(s): %srIrr}r)r�rvr�r�rwrsrrJ�
startswith�remove�	containerr�)rr7�
conflict_optsr�r~�co�c_options       r�_check_conflictzOptionContainer._check_conflict�sh���
��%�%�C��d�o�o�%��$�$�c�4�?�?�3�+?�%@�A�&��$�$�C��d�n�n�$��$�$�c�4�>�>�#�+>�%?�@�%���+�+�G��'�!�)�6��i�i�� ?��2��A��� ?�@�A�����I�%�'4�O�S�(��~�~�d�+� �+�+�2�2�3�7� �N�N�3�/� �,�,�3�3�C�8� �O�O�C�0�$�0�0�H�4G�4G� �*�*�6�6�=�=�h�G�(5�&���
!@s�+E8c��t|dt�r|j|i|��}n>t|�dk(r%|s#|d}t|t�std|z��td��|j
|�|jj|�||_	|jD]}||j|<�|jD]}||j|<�|j�h|jt ur%|j|j"|j<|S|j|j"vrd|j"|j<|S)zOadd_option(Option)
           add_option(opt_str, ..., kwarg=val, ...)
        rr%znot an Option instance: %r�invalid argumentsN)rr5rpr�rrr�r�r�r�r�rvr�rwr�r�r�r�)rrBrCr7r�s     r�
add_optionzOptionContainer.add_option�s*���d�1�g�s�#�&�T�&�&��7��7�F�
��Y�!�^�F��!�W�F��f�f�-�� <�v� E�F�F��/�0�0����V�$�������'�����%�%�C�#)�D�O�O�C� �&��$�$�C�"(�D�N�N�3��%��;�;�"��~�~�Z�/�-3�^�^��
�
�f�k�k�*��
����D�M�M�1�-1��
�
�f�k�k�*��
rc�4�|D]}|j|��yr )r�)rr�r7s   r�add_optionszOptionContainer.add_optionss��!�F��O�O�F�#�"rc�r�|jj|�xs|jj|�Sr )rvr�rwrAs  r�
get_optionzOptionContainer.get_options0�����#�#�G�,�,����"�"�7�+�	-rc�>�||jvxs||jvSr )rvrwrAs  r�
has_optionzOptionContainer.has_options$���4�?�?�*�*��4�>�>�)�	+rc�V�|jj|�}|�|jj|�}|�td|z��|jD]}|j|=�|j
D]}|j|=�|jjj|�y)Nzno such option %r)	rvr�rwrXr�r�r�r�r�)rr@r7r�s    r�
remove_optionzOptionContainer.remove_options������$�$�W�-���>��^�^�'�'��0�F��>��0�7�:�;�;��%�%�C�����$�&��$�$�C����s�#�%����$�$�+�+�F�3rc���|jsyg}|jD]5}|jtus�|j|j	|���7dj|�S�Nrk)r�r�rr�r�rJ)r�	formatterr�r7s    r�format_option_helpz"OptionContainer.format_option_helpsV���������&�&�F��;�;�-�/��
�
�i�5�5�f�=�>�'��w�w�v��rc�@�|j|j��Sr )r�r��rr�s  rr�z"OptionContainer.format_description(s���+�+�D�,@�,@�,B�C�Crc���g}|jr |j|j|��|jr |j|j	|��dj|�S)Nr�)r�r�r�r�r�rJ�rr�r�s   r�format_helpzOptionContainer.format_help+sV��������M�M�$�1�1�)�<�=�����M�M�$�1�1�)�<�=��y�y�� � rN)rr1r2r:r.rxrzrqrrr�r�r�r�r�r�r�r�r�r�r�r!rrrrxsY���<	*��(�(�
'� ��H�6�<$�-�+�4� �D�!rrc�,�eZdZdd�Zd�Zd�Zd�Zd�Zy)rNc�x�||_tj||j|j|�||_yr )rRrr.rprs�title)rrRr�r�s    rr.zOptionGroup.__init__6s4������ � ��&�%�%�v�'>�'>��	M���
rc�H�g|_|j|j�yr )r�rzrRrs rrozOptionGroup._create_option_list<s������#�#�D�K�K�0rc��||_yr )r�)rr�s  r�	set_titlezOptionGroup.set_title@s	����
rc�2�tj|�|`yr�)rr�r�rs rr�zOptionGroup.destroyCs������%��rc��|j|j�}|j�|tj	||�z
}|j�|Sr )r�r�rvrr�rxr�s   rr�zOptionGroup.format_helpJsJ���)�)�$�*�*�5�������/�-�-�d�I�>�>�������
rr )rr1r2r.ror�r�r�r!rrrr4s���1���rrc
��eZdZdZgZddedddddddf
d�Zd�Zd�Zd�Z	d	�Z
d*d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd+d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d,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*y).r	a$
    Class attributes:
      standard_option_list : [Option]
        list of standard options that will be accepted by all instances
        of this parser class (intended to be overridden by subclasses).

    Instance attributes:
      usage : string
        a usage string for your program.  Before it is displayed
        to the user, "%prog" will be expanded to the name of
        your program (self.prog or os.path.basename(sys.argv[0])).
      prog : string
        the name of the current program (to override
        os.path.basename(sys.argv[0])).
      description : string
        A paragraph of text giving a brief overview of your program.
        optparse reformats this paragraph to fit the current terminal
        width and prints it when the user requests help (after usage,
        but before the list of options).
      epilog : string
        paragraph of help text to print after option help

      option_groups : [OptionGroup]
        list of option groups in this parser (option groups are
        irrelevant for parsing the command-line, but very useful
        for generating help)

      allow_interspersed_args : bool = true
        if true, positional arguments may be interspersed with options.
        Assuming -a and -b each take a single argument, the command-line
          -ablah foo bar -bboo baz
        will be interpreted the same as
          -ablah -bboo -- foo bar baz
        If this flag were false, that command line would be interpreted as
          -ablah -- foo bar -bboo baz
        -- ie. we stop processing options as soon as we see the first
        non-option argument.  (This is the tradition followed by
        Python's getopt module, Perl's Getopt::Std, and other argument-
        parsing libraries, but it is generally annoying to users.)

      process_default_values : bool = true
        if true, option default values are processed similarly to option
        values from the command line: that is, they are passed to the
        type-checking function for the option's type (as long as the
        default value is a string).  (This really only matters if you
        have defined custom types; see SF bug #955889.)  Set it to false
        to restore the behaviour of Optik 1.4.1 and earlier.

      rargs : [string]
        the argument list currently being parsed.  Only set when
        parse_args() is active, and continually trimmed down as
        we consume arguments.  Mainly there for the benefit of
        callback options.
      largs : [string]
        the list of leftover arguments that we have skipped while
        parsing options.  If allow_interspersed_args is false, this
        list is always empty.
      values : Values
        the set of option values currently being accumulated.  Only
        set when parse_args() is active.  Also mainly for callbacks.

    Because of the 'rargs', 'largs', and 'values' attributes,
    OptionParser is not thread-safe.  If, for some perverse reason, you
    need to parse command-line arguments simultaneously in different
    threads, use different OptionParser instances.

    Nr|Tc�>�tj||||�|j|�|	|_||_d|_d|_|�
t�}||_|jj|�|
|_
|j||��|j�y)NT)�add_help)
rr.�	set_usage�progr��allow_interspersed_args�process_default_valuesrr�rir��_populate_option_list�_init_parsing_state)rr~r�rpr�rsr�r��add_help_optionr�r�s           rr.zOptionParser.__init__�s���	� � ��,� 0�+�	?����u����	����'+��$�&*��#���-�/�I�"������!�!�$�'����	
�"�"�;�,;�	#�	=�	
� � �"rc�|�tj|�|jD]}|j��|`|`|`y)a
        Declare that you are done with this OptionParser.  This cleans up
        reference cycles so the OptionParser (and all objects referenced by
        it) can be garbage-collected promptly.  After calling destroy(), the
        OptionParser is unusable.
        N)rr�r�r�r�)rr�s  rr�zOptionParser.destroy�s<��	����%��'�'�E��M�M�O�(������Nrc�@�g|_g|_|j�yr )r�r�rxrs rroz OptionParser._create_option_list�s���������$�$�&rc�@�|jdddtd���y)Nz-hz--helpr�zshow this help message and exit�r�r��r�rCrs r�_add_help_optionzOptionParser._add_help_option�s$������h�%��@�A�	�	Crc�>�|jddtd���y)Nz	--versionr�z&show program's version number and exitr�r�rs r�_add_version_optionz OptionParser._add_version_option�s"������(��G�H�	�	Jrc���|jr|j|j�|r|j|�|jr|j�|r|j	�yyr )�standard_option_listr�r�r�r�)rr�r�s   rr�z"OptionParser._populate_option_list�sW���$�$����T�6�6�7�����[�)��<�<��$�$�&���!�!�#�rc�.�d|_d|_d|_yr )�rargs�largsr;rs rr�z OptionParser._init_parsing_state�s����
���
���rc��|�td�|_y|turd|_y|j�j	d�r|dd|_y||_y)Nz%prog [options]zusage: �)rCr~rr�r�r}s  rr�zOptionParser.set_usage�sK���=��,�-�D�J�
�n�
$��D�J�
�[�[�]�
%�
%�i�
0��q�r��D�J��D�Jrc��d|_y)aSet parsing to not stop on the first non-option, allowing
        interspersing switches with command arguments. This is the
        default behavior. See also disable_interspersed_args() and the
        class documentation description of the attribute
        allow_interspersed_args.TN�r�rs r�enable_interspersed_argsz%OptionParser.enable_interspersed_args�s��(,��$rc��d|_y)z�Set parsing to stop on the first non-option. Use this if
        you have a command processor which runs another command that
        has options of its own and you want to make sure these options
        don't get confused.
        FNr�rs r�disable_interspersed_argsz&OptionParser.disable_interspersed_argss��(-��$rc��||_yr )r�)rr<s  r�set_process_default_valuesz'OptionParser.set_process_default_valuess
��&-��#rc�"�||j|<yr )r�)rr�r�s   r�set_defaultzOptionParser.set_defaults��#��
�
�d�rc�:�|jj|�yr )r�rU)rrCs  r�set_defaultszOptionParser.set_defaultss���
�
���V�$rc�|�|jdd}|jD]}|j|j��|Sr )r�r�r�)r�optionsr�s   r�_get_all_optionszOptionParser._get_all_optionss9���"�"�1�%���'�'�E��N�N�5�,�,�-�(��rc�n�|jst|j�S|jj�}|j	�D]]}|j|j�}t|t�s�/|j�}|j||�||j<�_t|�Sr )r�rr��copyr�r�r�rr5r2r5)rr�r7r�r@s     r�get_default_valueszOptionParser.get_default_valuess����*�*��$�-�-�(�(��=�=�%�%�'���+�+�-�F��l�l�6�;�;�/�G��'�3�'� �/�/�1��(.�(:�(:�7�G�(L�����%�	.��h��rc�0�t|dt�rt|g|��i|��}nWt|�dk(r>|s<|d}t|t�st	d|z��|j
|urt
d��t	d��|jj|�|S)Nrr%znot an OptionGroup instance: %rz"invalid OptionGroup (wrong parser)r�)	rr5rr�rrRrXr�r�)rrBrCr�s    r�add_option_groupzOptionParser.add_option_group+s����d�1�g�s�#���6�t�6�v�6�E�
��Y�!�^�F���G�E��e�[�1�� A�E� I�J�J��|�|�4�'� �!E�F�F��/�0�0����!�!�%�(��rc��|jj|�xs|jj|�}|r|j|ur|jSyr )rvr�rwr�)rr@r7s   r�get_option_groupzOptionParser.get_option_group;sO���/�/�%�%�g�.�.��.�.�$�$�W�-�	��f�&�&�d�2��#�#�#�rc�6�|�tjddS|ddSr$)r^�argv)rrBs  r�	_get_argszOptionParser._get_argsEs ���<��8�8�A�B�<����7�Nrc�8�|j|�}|�|j�}||_gx|_}||_	|j|||�}||z}|j||�S#ttf$r$}|jt|��Yd}~�Ed}~wwxYw)aR
        parse_args(args : [string] = sys.argv[1:],
                   values : Values = None)
        -> (values : Values, args : [string])

        Parse the command-line options found in 'args' (default:
        sys.argv[1:]).  Any errors result in a call to 'error()', which
        by default prints the usage message to stderr and calls
        sys.exit() with an error message.  On success returns a pair
        (values, args) where 'values' is a Values instance (with all
        your option values) and 'args' is the list of arguments left
        over after parsing options.
        N)r�r�r�r�r;�
_process_argsrrr|r5�check_values)rrBr;r�r��stop�errs       r�
parse_argszOptionParser.parse_argsKs������t�$���>��,�,�.�F���
����
�U����	!��%�%�e�U�F�;�D��u�}��� � ���.�.��	� 0�1�	!��J�J�s�3�x� � ��	!�s�A&�&B�5B�Bc�
�||fS)a�
        check_values(values : Values, args : [string])
        -> (values : Values, args : [string])

        Check that the supplied option values and leftover arguments are
        valid.  Returns the option values and leftover arguments
        (possibly adjusted, possibly completely new -- whatever you
        like).  Default implementation just returns the passed-in
        values; subclasses may override as desired.
        r!)rr;rBs   rr�zOptionParser.check_valuesrs����~�rc��|rx|d}|dk(r|d=y|dddk(r|j||�nK|dddk(r!t|�dkDr|j||�n"|jr|j	|�|d=ny|r�wyy)a�_process_args(largs : [string],
                         rargs : [string],
                         values : Values)

        Process command-line arguments and populate 'values', consuming
        options and arguments from 'rargs'.  If 'allow_interspersed_args' is
        false, stop at the first non-option argument.  If true, accumulate any
        interspersed non-option arguments in 'largs'.
        rrNrPr%r
)�_process_long_optr��_process_short_optsr�r�)rr�r�r;�args     rr�zOptionParser._process_argss������(�C��d�{��!�H���Q�q��T�!��&�&�u�f�5��R�a��C��C��H�q�L��(�(���7��-�-����S�!��!�H��'rc�.�t||j�S)a_match_long_opt(opt : string) -> string

        Determine which long option string 'opt' matches, ie. which one
        it is an unambiguous abbreviation for.  Raises BadOptionError if
        'opt' doesn't unambiguously match any long option string.
        )�
_match_abbrevrw)rr�s  r�_match_long_optzOptionParser._match_long_opt�s���S�$�.�.�1�1rc�&�|jd�}d|vr*|jdd�\}}|jd|�d}n|}d}|j|�}|j|}|j�rh|j}t|�|kr#|jtdd|�||d�z�nM|dk(r|jd�}	n6t|d|�}	|d|�=n"|r|jtd	�|z�nd}	|j|	||�y)
Nrrrr%TF�.%(option)s option requires %(number)d argument�/%(option)s option requires %(number)d arguments�r7�numberz%s option does not take a value)
�popr�insertr�rwr�r�r�r|rrrCr<)
rr�r;r�r��next_arg�had_explicit_valuer7r�r�s
          rr�zOptionParser._process_long_opt�s���i�i��l���#�:�!�i�i��Q�/�O�S�(��L�L��H�%�!%���C�!&���"�"�3�'������$�������L�L�E��5�z�E�!��
�
�8�D�E���),�u�=�>�?��!���	�	�!����e�A�e�n�-���!�E�'�N�
��J�J�q�:�;�c�A�B��E����s�E�6�4�0rc��|jd�}d}d}|ddD]�}d|z}|jj|�}|dz
}|st|��|j	�r�|t|�kr|j
d||d�d}|j}	t|�|	kr#|jtdd|	�||	d�z�n-|	dk(r|jd�}
nt|d|	�}
|d|	�=nd}
|j|
||�|s��yy)	NrFr%r
Tr�r�r�)r�rvr�rr�r�r�r�r|rrr<)rr�r;r�r��i�chr�r7r�r�s           rr�z OptionParser._process_short_opts�s"���i�i��l����
���a�b�'�B���(�C��_�_�(�(��-�F�
��F�A��$�S�)�)��!�!�#��s�3�x�<��L�L��C���G�,��D������u�:��%��J�J�x�H�I�� �-0�5�!A� B�C��a�Z�!�I�I�a�L�E�!�%��%�.�1�E��a��g�����N�N�3��v�t�4���Arc��|j�0tjjtj
d�S|jSr1)r�rU�path�basenamer^r�rs r�
get_prog_namezOptionParser.get_prog_names3���9�9���7�7�#�#�C�H�H�Q�K�0�0��9�9�rc�B�|jd|j��S)Nz%prog)r�r�)r�ss  r�expand_prog_namezOptionParser.expand_prog_names���y�y��$�"4�"4�"6�7�7rc�8�|j|j�Sr )r�r�rs rr�zOptionParser.get_descriptions���$�$�T�%5�%5�6�6rc�p�|rtjj|�tj|�yr )r^�stderr�writer@)r�statusr,s   rr@zOptionParser.exits#����J�J���S�!�����rc��|jtj�|jd|j	��d|�d��y)z�error(msg : string)

        Print a usage message incorporating 'msg' to stderr and exit.
        If you override this in a subclass, it should not return -- it
        should either exit or raise an exception.
        rPz	: error: r�N)�print_usager^r�r@r�r-s  rr|zOptionParser.errors2��	
������$��	�	�!�$�*<�*<�*>��D�Erc��|jr4|jj|j|j��Syr�)r~r�rr�rs r�	get_usagezOptionParser.get_usage#s7���:�:��>�>�.�.��%�%�d�j�j�1�3�
3�rc�T�|jrt|j�|��yy)aaprint_usage(file : file = stdout)

        Print the usage message for the current program (self.usage) to
        'file' (default stdout).  Any occurrence of the string "%prog" in
        self.usage is replaced with the name of the current program
        (basename of sys.argv[0]).  Does nothing if self.usage is empty
        or not defined.
        ��fileN)r~�printr�rrs  rrzOptionParser.print_usage*s!���:�:��$�.�.�"��.�rc�R�|jr|j|j�Syr�)r�r�rs r�get_versionzOptionParser.get_version6s!���<�<��(�(����6�6�rc�T�|jrt|j�|��yy)aEprint_version(file : file = stdout)

        Print the version message for this program (self.version) to
        'file' (default stdout).  As with print_usage(), any occurrence
        of "%prog" in self.version is replaced by the current program's
        name.  Does nothing if self.version is empty or undefined.
        rN)r�rrr	s  rrAzOptionParser.print_version<s#���<�<��$�"�"�$�4�0�rc��|�|j}|j|�g}|j|jt	d���|j�|jr6|jtj||��|jd�|jD]3}|j|j|��|jd��5|j�dj|dd�S)N�Optionsr�rkr�)
r�r�r�r�rCrvr�rr�r�r�rxrJ)rr�r�r�s    rr�zOptionParser.format_option_helpGs��������I��&�&�t�,����
�
�i�.�.�q��|�<�=���������M�M�/�<�<�T�9�M�N��M�M�$���'�'�E��M�M�%�+�+�I�6�7��M�M�$��(�	�����w�w�v�c�r�{�#�#rc�8�|j|j�Sr )r�r�r�s  rr�zOptionParser.format_epilogXs���&�&�t�{�{�3�3rc�~�|�|j}g}|jr"|j|j�dz�|jr#|j|j|�dz�|j|j
|��|j|j|��dj|�Sr�)	r�r~r�rr�r�r�r�rJr�s   rr�zOptionParser.format_help[s��������I����:�:��M�M�$�.�.�*�T�1�2�����M�M�$�1�1�)�<�t�C�D��
�
�d�-�-�i�8�9��
�
�d�(�(��3�4��w�w�v��rc�f�|�tj}|j|j��y)z�print_help(file : file = stdout)

        Print an extended help message, listing all options and any
        help text provided with them, to 'file' (default stdout).
        N)r^�stdoutr�r�r	s  rr?zOptionParser.print_helpgs'���<��:�:�D��
�
�4�#�#�%�&r)T)NN)rNr )+rr1r2r:r�rr.r�ror�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r@r|rrrrAr�r�r�r?r!rrr	r	Rs���B�H���!�$��")�!��!%���#�D�$'�
C�
J�
$��	�,�-�.�$�%�� �"� ��%/�N��f2�"1�H$�R�8�7��
F��
/��	1�$�"4�
�'rr	c���||vr|S|j�D�cgc]}|j|�r|��}}t|�dk(r|dS|st|��|j	�t||��cc}w)z�_match_abbrev(s : string, wordmap : {string : Option}) -> string

    Return the string key in 'wordmap' for which 's' is an unambiguous
    abbreviation.  If 's' is found to be ambiguous or doesn't match any of
    'words', raise BadOptionError.
    r%r)rr�r�r�sortrE)r��wordmap�wordrGs    rr�r�ts���	�G�|���+2�,�,�.�0�.�$� �O�O�A�.��.�
�0��}���"� ��#�#�� ��#�#�
��� �&�q�-�8�8��0s�A1)'r:�__version__�__all__�
__copyright__r^rUr�rrr�ImportErrorrC�	Exceptionr
rrrrrEr
rrr�r�r�r�r�r�rr�rrrrrrr	r�rr!rr�<module>rsy���.����$�
�@��J�	�)����Y���=�� �;��
�
��6�m�6�
A�N�
A�M�M�^?�]�?�&G�=�G�&� �%�a�	�l�3�%�q��|�4�!�1�%5�#6�7�%�q��|�4�7��
G�%��
�n�n�f"�
�#��>#�>#�By!�y!�x�?��<]'�O�]'�D9�:���m1����	�s�C:�:D�D