����C %# , #&')*)-0-(0%()(��C (((((((((((((((((((((((((((((((((((((((((((((((((((����"�������@�@�hC��}!���Ѱ��<"� 9iׂIIIHk�+?�c?��*Y�����!�du)b�T�9вU�$8G��I.�澬��D���Sq� q�}.<��Z�l�V!X� *x�-�\����t3i�Ũ�sNv71�ƛ\��z|t�L���$�����*f��kʮ��7�H;���~F%�'3�@�H�q�` 9mOL����/x@ @��G
d�8F�ه��Ka�Kdr�Fh.�]y4 JЛ��]�K�B�E$��$ $ �PR�����G�]��u�i$�$���'! "#031���C/Td=S�Q?���62Ccj{ ����̏d�چ/c�V�`��Wz͈�{Y`�d�h�L �]OB���l���o���mr���n��s-ڗEZ��N�_��1%b���H�ϣ������V�7):�ӷ)�}�~�(�;�!�b1�5K��[E�vϻ>��q.%� ���O���(�c�#x�$�'+��`٥v��v(�����M�"�v��B��.�a ���T�~�ϕ�hy(6nݱl��1yNɓx�������AR�8�rqv1.cS�+��_���&@�� �u�M�5Ĉ�Xm���eL�X�q��y#�9]�c�}ɄL��d�eJ몓���I1T�d��CaM�$��T�,�X �bʭ�!�%F5��X1x#���!�q��\��F��2��&Rq���C�ol~�̱�.0ϦL�d�`.������ ���m{�Y~k{C��}bv�;U��c<�r�~ɜs�1�j��]W�l��*նCr��Q�N9�-������d��E؛��nF��eړ�8(q��5UgRȱGTA��*������̆��V�珰����ezN��h�U]�T�FG�^���<��ay�,!���5.� �u�bΚ�V�J%��m�Dxn'�����6�@BPa�`��Hts� �ɮ���Ŏ�Zɬ��%B�X��d5Z���hC}�䅸�p+ k=��ʒ(�aՏFG&�%@/�{+�Yu+�ȣGѩ"O%�|vȲxF>�N(��ou�h6 &Y5��8�7�E$-��']n,@TD\��+���Ry�U��U^�Q,f>��1�����q��f��U��� ����F���ڥ��>I�����fNUw�u��#OMMQ6� N�*��_�� k� ����rS��`���1�:��!�F'<+� � b?O��2 !Q12A��� "3a������#$��?�,�7�!`yǮ(�1�6w��a���� �F�#��?*"s���v>��Ⱥ����f�v��͑���s����������]Gn��S ���ȥpG ы�E�g�)Z���x�rY�q�]�@f�_܃�pչEڎّC ����Ŝ*/ �h�O�Sv�و\��5��U��y��|o�Hm2C�S�BW����)��5��{T��W���=o*RA��<����L0g4{��쁢�ep�rw�8��7��U���t<Ԍѻ7�fGf�k}���Ê�㛆Gռz�Q@��{C��'G��8�!�S$�j��x���|���צV<��,����u�k�uu�rM�f�_dϣi ߫�ԟn�!K����mxu�=�槻�'j�X�����������%!A "1QR#Br��?�R:��R�n�b[�II?#��6<:�$gN����lGNlrr��dעMMn`ɿy�,�%B�e�W��dVS��r���� %�tT��(�ɷ��S�]�O]#�_LEMHN�M���kv���~X���O6�U�V_�����b���J�t�774����D!1AQa"2q�#3BRb����0���� 4CSr����cst�����?��^q���7�dG�U�"p��moz��'��n_x���唹e������<6��O�t���R>k��s=�Cr���e�?�i��� ����/��ں$be���o`ޮ�GHy�;fNAl�8��.�\�S������"���a�úF�YvNk�-*`v�k�ʈ2f�EE��Wa�,� �fF^#�;��[9��^~������Y$:0#W3������Z*���I�Z�ڹ�k�n--9=��G��;7F)m{T�Ɇ��=�����Ȭ5�5�B�aڞ5M����#m�5Ʀ��m�8��+Hh���$�}�:&�e�Q�[;i]С�:�:��o����$<~��5RB�?�s3�5�r��O��ֿ�w�P/��̅���(�Z6�R>)��N��4�!ʊ�wz�-�r�w+�yk���q�1�bKhƸ�4N�Ӑ�X����Q��_��})�+e1�5��n��q?��[�^�9�<�z3Fsi�8�'�)9p)�{��RP�Z+�*��p(aY��V����6l�g�9��;���d�u���Nt@�3�sTwzaŇ�GT�b�H��(#��*zc�������9K�b1�����t����Ê��
�Z?g�iD���H�R���B���^M����v���O���L�D,'d�q�C�P�����$Δ��U�֟֊=�s��F�$��J�ދZ?�N��������A�N�WP��,�� �¦�&;�x��dup�����i���Ipd���;�Dž!��ֿѮAb%�u��}j��-p��>I�[�N�bi����G�'�;4w�m]H�]����#LӘNN��R��������s�.]��en��-�8e��Ps����Q��;���ț�E�ݫ���7��g�_L��W��EZ:/��I���a�g�n�ܤ��iٹ���ŷ�T���H~i�a�����֎�~KV������ A-2m]�F"�m�9-Zbǰ�״ @����~�4�N�[�Uxč�tl>������u#r�gѐ�3���;M9�<�J�����1�vfL8����1�P�HgP�Xv��������{����O�}�n��KQ؋����7<�l�fey<�}�>�bX���4<`Y7���si��V)�s�:�{�rO�h�z �@4VW�B���&�������ɡob܋�F��4>y�s�fXWS�N�O$�,.u:�ԫ��g�yao4��$h��D#��ٸf^kh�7�#1Z�֥&���*�v-��;bޭ����Q�����h�ow�y]�ه.+�7�M�ⴻ �JY��g�f�i3q��KC��3�¹�?5�Z.N��^Z w���KF͂���7��ރ۞��wj��T�J.�q��\Sv1U����R��욽&�N����pЖ`�`у��m`v�n#z��4��>e��V�`'���h�����'�j�AҔ�-�4:H���n]9�h<��n����U�6m��2c�E�1/�Y�%���I��~ʏ�|VBƟ@����;�������%�M9M���}��1�D��d����%g���O��]��у&�r��f�7�uܲ���(!1AQaq�������0� ���?!��*��@)�Je�G��j��{�['��v+���������)���(�/����д%젍Z��kk�Lu�Rm���j.c���@Z� V�J��d��j���h6���2AO�� a;oBu���H�=���nK�W8�B�ɰ�u?��бأm,�sr����|����8˨i��qI2tZ�ۄJP��XE��������zޔj~]UMu����zv!����N�&�1�Y��zJ�ՠ��\p��o'ሸ�C؊Y��TD"HM5�Ъ��i߯a���F����A)�����ڮ����z�E���@�hg�֝8�1jk��\�M�3�8ܢ�� ������s�7����N}�ޭ������GN�Bc���L pk�;�J�δ3�e�iU�gAYW]\�>�GyگQ=��f�KA;T�a`eM+Q �� �Ln���̌]GM�����<Ħ�j���H��N�M�x�}aX{̣S� ��ԅ��n�MA�S�r�(����(�L��zo9���.�;
�ӳf������`Ӕ٢3�� IW��\9~_���saa�\ԊW�ܭX:���ӆ�38�ty*����N�qP����BI�Y��jE��>DP�!�R%-��4��'�皺;��~J�!�7m���X��h�P!曭���$�\�AYj�.lC��4��+�jD�dgC0-*���|��`ZD�+л�C"��)��s��8Kq�pq���Ms��4� ��7\U`�.��[Ey8��AH!/��,���(:M -�T䓥�~O�4-���Ԓn��}HDN7���K���$�_Ԕ䚞`�R�hB�_aX?4V��ŗ�@ه�u�a�;�{PcT+�������7YBo�?��r-ͩ{�ĎA�� ����˼n��M286��G���1���V�˜Jв"l��V5���5�C]h���̊�A���%� �'p���Ԃ���Ր��9=�d�=�e�{�'<3�_ �:^�~��4�(�n�-C�s��5m![�jmIqU�~�Tw8��`���p�H8�u�Д l m�aP�0�������9y����CM��F1G糞�.�U~�������FC�{�!e(Y�:���P����7~;�L�N^{�1r�\���ԬG(���0d�ÏO�qK�Z�⑼�T�{ 2��s��Kd�Տ?mMQ��=���6�7�i�����H+����9��d��=��;�QؤH8n�Lb�D��yS%�(�{b���Cu���p�t#C���$A"�H{���jqᶯ�:�n=E����hH�`�!�m��MA������?�v6���+MԿ⟚qK�i�D�*Q5��CZ���2�|]�:Xd+�t�:o@��M��� :�32��b����[\5=�ֵ7])�|t��Ϻ����w�B�ń�e���!`�:��I,��9:����j@/a 8����+<�u�(T^ۺ~��2oE�B�%b)��z��ݳځ�)��i�j��&��Fi`qr��w���7�@��P�� �3Z&<�m�S�C����7t�T����ƴ�q~J�e�r6�Z]�rL���ه�E17'�x���+[�ܜTc6�/�����W�`�qpMJ���N5^����x�}{l�Fm������1�oZ\�����/d�/6� �uӸ�0elXuX;M��$M�}mB��������Z%e���3f�js����O�J~2�z�86�*PB��v�Ν��e-��.�/��L�O����2����9���4}|��T5M���hÐ7�F*��l+y0����:|��=k[�d�;|�ԉe�=w�<��õ�<��'!1AQaq����� ������?��5����)�(���+>v����6&{���Ǹ@����M�����v��iA 6T'�w��h�s �E}�x��G&'g�� J~1q�f�f���&��q˘���-���vYm
�/i1 �I��6��u,)�#�,����l}*&`�$�ͬe�%�w3�x�Ѥ�Xc�D��执g�峕�5B/�|$��=���%8 a��2.l� c�@G� �\�/x[өq�]�v5?�����N|�!���\��,>��{�"r�/��?��&!1QAa�� ��ᑱ����?ĊD�肭�� nv@�yޝ (�����I ����U - ���b�m�E>,��1v!�d�&�� ���&�檔�5D�&0P��Ԕ�͒@Z��:E"� Q��`>PH:~�O�����P�3W��@hM��k�U��\�O��R�������5ʄ�,��f�|��r���}јxo)�"+h�QK���/��0�`�5�{M~�� ���'!1AQaq���0 �������?�?�k��#^�~�G��#V,������#Z�1'ܤ����������~p�O%O�O�\�q�`�~��}��E�Ű5 �輸�du����x\�$���s[�{T2t`B��gq�4Z]b� 㛪�3,(@����bAp�r)9:@|b�!r�g:N�^�Ʌ��� �x_�\��pm7I��0?>^k��������w���|.K�[sF@�]Gn*L �yO� le�P�.p��֍�j�S�=�ʨ�ןQF�"��5zʼn���k�*8�u" ����Fg��� �cSy�V������Ƈ��N��ؐ(�����48hV�A�ӎ^��^ ���jyB� ��p"�����y]�ļlU�(�7�U`3�pCGF'&yg������o��z������X��ν:�P"@�G@x[��o&MJ�$F.����hi w;}�/^͇q���n�mN�/�TQ���އ��O1\,}��bQ #¯^S!)��X���#GPȏ�t�� c^\��' }iIZ���a�)��������z��4͊�Ξy��48,��f���#�����KP!Jx�|w�ʆ�������������#��Z�������< �~K��r�p&qH/;�R���沽�+�E�R���~0v���V#ʀ�T��S(-ڝ��B�y�b�C�D������b��������8��~�= �Y�ͧ]��@n����M�k2�%�;�%,�r6�LR腻?^��;KŇ=�ք ���=`�ɥ��/����z�&�I{���#J��M���C��}�H9^UJ�,P ��pS����G�d69Ϭu���%"��ˢP��K�"k)��=��9� ����㇌,��Oli��Xzh� " � ������R��^�s����N�k��Q>�63(���� ��PQ�Py�����3����$f+W՛=4�ǁ`*��^��Eb�K�t�6��^��!�籷��ȭ��K{/;�L���p�x�����;a���Oلz�[�.NP4�]Gc�T�v����~sg'LED��]j��'�G�]�6rY����UPw�*O�İՋi�'8�۴�#g�Xx+=�eU6�R��c�"�u2��~�?n�y�;�u��3�'��6�f������b��߬M�$*��k&?6���*^1n����ێz)<��Gz� �����7����Y� ��ۃ)$A��2�L6� ե�H�<�r��#ʽ2��O��R���z�A��XW��@���������<�G� Ϥ�^�˓i�M�W���6 ��0��m){c�;ݧ�>R�a����}1�ٯ%�EY2�Q��Ep���$ ��E��qS��t#+x� *�h�UI��XM?�'//��a'�G�����q@���<��z��؟����cd��z�ˬT_u�Ѯ����&�z�k ��n ]�a%�py»�`Qd�xc������n�� ��*��oTd�;'j�<�!j���'�(~�ʹW�M� P�mȘ��@֨V+��R�`�$��`�+@��_[�kG����P���Zh9�R����&5b�v���Z���#p�&�Ա+��8�etZ7G���;��@"�e0���v7����?��z�?_���_�q1�T�"�p�ˎ/U 6_�B�>��0( ��}G#������Ȣ�p�� �9��;/& `�B&$�y��t(�*z�x���Ӕ������S�?Kȏ3���{p� b � ۍ-�z܈֦��6?<���ǬP�N�G �更� �6�/h�����0Z���������i�ua��e�*M'A� �x��v�q.>�F� oN{��Q���{gD��L��u��=|���O xN���d���q�8(��E�Uu��,��O� t�DJ ����;��G����e���C��VYZ�� ���T4{����(�Ӳ'c�t�f��w�c�jr�e�m �#7,�6��B�E4Q�P�.P�(&��^{9H-�m�o ��q�g1���=��>p�)/"p0!4�mS6ú�FN���h��D �)��XdT �FؤZ⸚�k���H�c8v� <���u�P�Հ���:��_�EN��|�ӛ��u?-�/�o�Lhk�ܸ�S�;�Rī�����T"�N����M��px7<�� j�$��`�Y)Pjh 5` K�Qf�4�C�bX"�D���;HD�Z�9R b�F)�UA����v�#��HD�!{������>I� �`�ԁ i�4�)t*�ç�Le�_���>ru�GEQg��ǔct��ō0��l6v���d�� ��GG8���v^�|�#JyZPSO�� Y�CuAߐ�"�x���OfHF@�K�V�!少Eҕ]h� ��[���)��.q����*0I<8��^�6�}p��^tho���ig�i����DK���p,��2�3�I��5����쓄OY�6s7Qs�Ow^�w�J/�A➰������0������g(Մ��y��Kԇ����QS��?H���w�X�=��ҞX�~���Q=�'���p?7�@g�~�G�}�r��g�T?���
One Hat Cyber Team
star
One Hat Cyber Team
star
Your IP :
3.143.170.30
Server IP :
50.6.170.23
Server :
Linux 50-6-170-23.bluehost.com 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Server Software :
Apache
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib64
/
python3.9
/
__pycache__
/
View File Name :
argparse.cpython-39.opt-1.pyc
a �����DOgG���������������������@���s��d�Z�dZg�d�ZddlZddlZddlZddl m Z mZ�dZdZ dZd Zd ZdZdZG�d d��de�Zdd��ZG�dd��de�ZG�dd��de�ZG�dd��de�ZG�dd��de�ZG�dd��de�Zdd��ZG�dd��de�ZG�dd ��d e�ZG�d!d"��d"e�ZG�d#d$��d$e�Z G�d%d&��d&e�Z!G�d'd(��d(e�Z"G�d)d*��d*e"�Z#G�d+d,��d,e"�Z$G�d-d.��d.e�Z%G�d/d0��d0e�Z&G�d1d2��d2e�Z'G�d3d4��d4e�Z(G�d5d6��d6e�Z)G�d7d8��d8e�Z*G�d9d:��d:e%�Z+G�d;d<��d<e�Z,G�d=d>��d>e�Z-G�d?d@��d@e�Z.G�dAdB��dBe.�Z/G�dCdD��dDe/�Z0G�dEdF��dFee.�Z1dS�)Ga� ��Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The following is a simple usage example that sums integers from the command-line and writes the result to a file:: parser = argparse.ArgumentParser( description='sum the integers at the command line') parser.add_argument( 'integers', metavar='int', nargs='+', type=int, help='an integer to be summed') parser.add_argument( '--log', default=sys.stdout, type=argparse.FileType('w'), help='the file where the sum should be written') args = parser.parse_args() args.log.write('%s' % sum(args.integers)) args.log.close() The module contains the following public classes: - ArgumentParser -- The main entry point for command-line parsing. As the example above shows, the add_argument() method is used to populate the parser with actions for optional and positional arguments. Then the parse_args() method is invoked to convert the args at the command-line into an object with attributes. - ArgumentError -- The exception raised by ArgumentParser objects when there are errors with the parser's actions. Errors raised while parsing the command-line are caught by ArgumentParser and emitted as command-line messages. - FileType -- A factory for defining types of files to be created. As the example above shows, instances of FileType are typically passed as the type= argument of add_argument() calls. - Action -- The base class for parser actions. Typically actions are selected by passing strings like 'store_true' or 'append_const' to the action= argument of add_argument(). However, for greater customization of ArgumentParser actions, subclasses of Action may be defined and passed as the action= argument. - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, ArgumentDefaultsHelpFormatter -- Formatter classes which may be passed as the formatter_class= argument to the ArgumentParser constructor. HelpFormatter is the default, RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser not to change the formatting for help text, and ArgumentDefaultsHelpFormatter adds information about argument defaults to the help. All other classes in this module are considered implementation details. (Also note that HelpFormatter and RawDescriptionHelpFormatter are only considered public as object names -- the API of the formatter objects is still considered an implementation detail.) z1.1)�ArgumentParser� ArgumentError�ArgumentTypeError�BooleanOptionalAction�FileType� HelpFormatter�ArgumentDefaultsHelpFormatter�RawDescriptionHelpFormatter�RawTextHelpFormatter�MetavarTypeHelpFormatter� Namespace�Action�ONE_OR_MORE�OPTIONAL�PARSER� REMAINDER�SUPPRESS�ZERO_OR_MORE�����N)�gettext�ngettextz==SUPPRESS==�?�*�+zA...�...�_unrecognized_argsc�������������������@���s(���e�Zd�ZdZdd��Zdd��Zdd��ZdS�) �_AttributeHoldera��Abstract base class that provides __repr__. The __repr__ method returns a string in the format:: ClassName(attr=name, attr=name, ...) The attributes are determined either by a class-level attribute, '_kwarg_names', or by inspecting the instance __dict__. c�����������������C���s����t�|��j}g�}i�}|����D�]}|�t|���q|����D�],\}}|���rZ|�d||f���q6|||<�q6|rz|�dt|����d|d�|�f�S�)N�%s=%rz**%s�%s(%s)�, )�type�__name__� _get_args�append�repr�_get_kwargs�isidentifier�join)�self� type_name�arg_strings� star_args�arg�name�value��r.���� /usr/lib64/python3.9/argparse.py�__repr__t���s���� z_AttributeHolder.__repr__c�����������������C���s���t�|�j����S��N)�list�__dict__�items�r'���r.���r.���r/���r$�������s����z_AttributeHolder._get_kwargsc�����������������C���s���g�S�r1���r.���r5���r.���r.���r/���r!�������s����z_AttributeHolder._get_argsN)r ���� __module__�__qualname__�__doc__r0���r$���r!���r.���r.���r.���r/���r���k���s���r���c�����������������C���s6���|�d�u�rg�S�t�|��tu�r$|�d�d���S�dd�l}|�|��S��Nr���)r���r2����copy)r4���r:���r.���r.���r/����_copy_items����s����r;���c�������������������@���s����e�Zd�ZdZd;dd�Zdd��Zd d ��ZG�dd��de�Zd d��Z dd��Z dd��Zdd��Zd<dd�Z dd��Zdd��Zdd��Zdd��Zdd ��Zd!d"��Zd#d$��Zd%d&��Zd'd(��Zd)d*��Zd+d,��Zd-d.��Zd/d0��Zd1d2��Zd3d4��Zd5d6��Zd7d8��Zd9d:��ZdS�)=r���z�Formatter for generating usage messages and argument help strings. Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail. ��������Nc�����������������C���s����|d�u�r"dd�l�}|���j}|d8�}||�_||�_t|t|d�|d���|�_||�_d|�_ d|�_ d|�_|��|�d��|�_ |�j |�_t�dtj�|�_t�d�|�_d�S�)Nr���r<�������z\s+z\n\n\n+)�shutil�get_terminal_size�columns�_prog�_indent_increment�min�max�_max_help_position�_width�_current_indent�_level�_action_max_length�_Section� _root_section�_current_section�_re�compile�ASCII�_whitespace_matcher�_long_break_matcher)r'����prog�indent_increment�max_help_position�widthr?���r.���r.���r/����__init__����s"���� �zHelpFormatter.__init__c�����������������C���s"���|��j�|�j7��_�|��jd7��_d�S��N�����rH���rC���rI���r5���r.���r.���r/����_indent����s����zHelpFormatter._indentc�����������������C���s"���|��j�|�j8��_�|��jd8��_d�S�rX���rZ���r5���r.���r.���r/����_dedent����s����zHelpFormatter._dedentc�������������������@���s���e�Zd�Zddd�Zdd��ZdS�)zHelpFormatter._SectionNc�����������������C���s���||�_�||�_||�_g�|�_d�S�r1���)� formatter�parent�headingr4���)r'���r]���r^���r_���r.���r.���r/���rW�������s����zHelpFormatter._Section.__init__c�����������������C���s����|�j�d�ur|�j����|�jj}|dd��|�jD���}|�j�d�urD|�j����|sLdS�|�jturz|�jd�urz|�jj}d|d|�jf�}nd}|d||dg�S�)Nc�����������������S���s���g�|�]\}}||���qS�r.���r.���)�.0�func�argsr.���r.���r/���� <listcomp>���������z6HelpFormatter._Section.format_help.<locals>.<listcomp>��z%*s%s: � ) r^���r]���r[����_join_partsr4���r\���r_���r���rH���)r'���r&���� item_help�current_indentr_���r.���r.���r/����format_help����s���� z"HelpFormatter._Section.format_help)N)r ���r6���r7���rW���rj���r.���r.���r.���r/���rK�������s��� rK���c�����������������C���s���|�j�j�||f��d�S�r1���)rM���r4���r"���)r'���ra���rb���r.���r.���r/���� _add_item����s����zHelpFormatter._add_itemc�����������������C���s0���|������|��|�|�j|�}|��|jg���||�_d�S�r1���)r[���rK���rM���rk���rj���)r'���r_����sectionr.���r.���r/���� start_section����s����zHelpFormatter.start_sectionc�����������������C���s���|�j�j|�_�|�����d�S�r1���)rM���r^���r\���r5���r.���r.���r/����end_section����s���� zHelpFormatter.end_sectionc�����������������C���s$���|t�ur |d�ur |��|�j|g��d�S�r1���)r���rk����_format_text)r'����textr.���r.���r/����add_text����s����zHelpFormatter.add_textc�����������������C���s&���|t�ur"||||f}|��|�j|��d�S�r1���)r���rk���� _format_usage)r'����usage�actions�groups�prefixrb���r.���r.���r/���� add_usage����s����zHelpFormatter.add_usagec�����������������C���sr���|j�turn|�j}||�g}|��|�D�]}|�||���q$ttt|��}||�j�}t|�j |�|�_ |�� |�j|g��d�S�r1���)�helpr����_format_action_invocation�_iter_indented_subactionsr"���rE����map�lenrH���rJ���rk����_format_action)r'����action�get_invocation�invocations� subaction�invocation_length� action_lengthr.���r.���r/����add_argument��s���� �zHelpFormatter.add_argumentc�����������������C���s���|D�]}|���|��qd�S�r1���)r����)r'���rt���r~���r.���r.���r/���� add_arguments��s����zHelpFormatter.add_argumentsc�����������������C���s.���|�j����}|r*|�j�d|�}|�d�d�}|S�)N� rf���)rL���rj���rR����sub�strip)r'���rx���r.���r.���r/���rj�����s ���� zHelpFormatter.format_helpc�����������������C���s���d��dd��|D���S�)Nre���c�����������������S���s���g�|�]}|r|t�ur|�qS�r.���)r���)r`����partr.���r.���r/���rc���"��s����z-HelpFormatter._join_parts.<locals>.<listcomp>)r&���)r'����part_stringsr.���r.���r/���rg���!��s���� �zHelpFormatter._join_partsc��������������������s��|d�u�rt�d�}|d�ur,|t|�jd��}�n�|d�u�rL|sLdt|�jd��}�n�|d�u��rdt|�jd��}g�}g�}|D�] }|jr�|�|��qr|�|��qr|�j} | ||�|�} d�dd��|| fD���}|�j|�j���t |�t |����k�rd}| ||�}| ||�} t �||�}t �|| �}d��fdd � }t |�t |��d ���k�r�dt |�t |��d��}|�r|||g|�||�}|�|||���n |�r�||g|�||�}n|g}nZdt |��}||�}|||�}t |�dk�r�g�}|�|||���|�|||���|g|�}d�|�}d ||f�S�)Nzusage: �rS���z%(prog)s� c�����������������S���s���g�|�]}|r|�qS�r.���r.���)r`����sr.���r.���r/���rc���B��rd���z/HelpFormatter._format_usage.<locals>.<listcomp>z%\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+c��������������������s����g�}g�}|d�urt�|�d�}nt�|�d�}|�D�]Z}|d�t�|����krn|rn|�|d�|����g�}t�|�d�}|�|��|t�|�d�7�}q.|r�|�|d�|����|d�ur�|d�t�|�d���|d<�|S�)NrY���r����r���)r|���r"���r&���)�parts�indentrv����lines�line�line_lenr������ text_widthr.���r/���� get_linesV��s"���� z.HelpFormatter._format_usage.<locals>.get_linesg�������?rY���rf���z%s%s )N) �_�dictrB����option_stringsr"����_format_actions_usager&���rG���rH���r|���rN����findall�extend)r'���rs���rt���ru���rv���rS���� optionals�positionalsr~����format�action_usage�part_regexp� opt_usage� pos_usage� opt_parts� pos_partsr����r����r����r����r.���r����r/���rr���&��sX���� � zHelpFormatter._format_usagec�������������� ���C���s��t���}i�}|D��]*}|js(td|�����z|�|jd��}W�n�tyR���Y�qY�q0�|t|j��}|||��|jkr|jD�]}|�|��qz|js�||v�r�||��d7��<�nd||<�||v�r�||��d7��<�nd||<�nF||v�r�||��d7��<�nd||<�||v��r||��d7��<�nd||<�t|d �|�D�]} d || <��q*qg�} t|�D��]"\} }|j t u��r�| �d���|�| �d k�r�|� | ��n"|�| d ��d k�rj|� | d ���n�|j�s|��|�}|��||�}||v��r�|d�dk�r�|d�dk�r�|d d��}| �|��nf|jd�} |jdk�r$|���}n"|��|�}|��||�}d| |f�}|j�s`||v�r`d |�}| �|���qHt|dd�D�]} || �g| | | �<��qzd�dd��| D���}d}d}t�d|�d|�}t�d|�d|�}t�d||f�d|�}t�dd|�}|���}|S�)Nzempty group r���z [�[�]z (�(�)rY����|����%s %s�[%s]T)�reverser����c�����������������S���s���g�|�]}|d�ur|�qS�r1���r.���)r`����itemr.���r.���r/���rc������rd���z7HelpFormatter._format_actions_usage.<locals>.<listcomp>z[\[(]z[\])]z(%s) z\1� (%s)z%s *%sre���z\(([^|]*)\))�set�_group_actions� ValueError�indexr|����add�required�range� enumeraterx���r���r"����get�popr�����#_get_default_metavar_for_positional�_format_args�nargs�format_usage�!_get_default_metavar_for_optional�sortedr&���rN���r����r����)r'���rt���ru���� group_actions�inserts�group�start�endr~����ir�����defaultr����� option_string�args_stringrp����open�closer.���r.���r/���r�������s~���� z#HelpFormatter._format_actions_usagec�����������������C���sF���d|v�r|t�|�jd��}t|�j|�j�d�}d|�j�}|��|||�d�S�)Nz%(prog)r��������r����r����)r����rB���rE���rG���rH���� _fill_text)r'���rp���r����r����r.���r.���r/���ro������s ���� zHelpFormatter._format_textc����������� ������C���sN��t�|�jd�|�j�}t|�j|�d�}||�j�d�}|��|�}|jsV|�jd|f}d|�}n@t|�|kr~|�jd||f}d|�}d}n|�jd|f}d|�}|}|g}|j�r|j� ���r|�� |�} | �r"|��| |�} |�d|d| d�f���| dd���D�]}|�d|d|f���q�n|� d��s"|�d��|��|�D�]}|�|��|����q,|��|�S�) Nr<���r����re���z%*s%s z %*s%-*s r���rY���rf���)rD���rJ���rF���rE���rG���rH���ry���rx���r|���r�����_expand_help�_split_linesr"����endswithrz���r}���rg���) r'���r~���� help_position� help_width�action_width� action_header�tup�indent_firstr����� help_text� help_linesr����r����r.���r.���r/���r}������s:���� � zHelpFormatter._format_actionc�����������������C���s����|j�s&|��|�}|��||�d�\}|S�g�}|jdkrB|�|j���n4|��|�}|��||�}|j�D�]}|�d||f���q^d�|�S�d�S�)NrY���r���r����r���) r����r�����_metavar_formatterr����r����r����r����r"���r&���)r'���r~���r�����metavarr����r����r����r.���r.���r/���ry���'��s���� z'HelpFormatter._format_action_invocationc��������������������sP���|j�d�ur|j���n.|jd�ur<dd��|jD��}dd�|����n|����fdd�}|S�)Nc�����������������S���s���g�|�]}t�|��qS�r.�����str)r`����choicer.���r.���r/���rc���C��rd���z4HelpFormatter._metavar_formatter.<locals>.<listcomp>z{%s}�,c��������������������s���t���t�r��S���f|��S�d�S�r1���)� isinstance�tuple)� tuple_size��resultr.���r/���r����H��s���� z0HelpFormatter._metavar_formatter.<locals>.format)r�����choicesr&���)r'���r~����default_metavar�choice_strsr����r.���r����r/���r����?��s���� z HelpFormatter._metavar_formatterc�����������������C���s��|���||�}|jd�u�r$d|d��}n�|jtkr<d|d��}n�|jtkrn|d�}t|�dkrdd|�}nd|�}n�|jtkr�d|d��}n�|jtkr�d}nr|jtkr�d |d��}nZ|jtkr�d }nJzdd��t |j�D��}W�n�t y����td �d��Y�n0�d�|�||j��}|S�)N�%srY���r����r<���z [%s [%s ...]]z[%s ...]z%s [%s ...]r���z%s ...re���c�����������������S���s���g�|�]}d��qS�)r����r.���)r`���r����r.���r.���r/���rc���e��rd���z.HelpFormatter._format_args.<locals>.<listcomp>zinvalid nargs valuer����) r����r����r���r���r|���r ���r���r���r���r����� TypeErrorr����r&���)r'���r~���r�����get_metavarr����r�����formatsr.���r.���r/���r����O��s0���� zHelpFormatter._format_argsc�����������������C���s����t�t|�|�jd�}t|�D�]}||�tu�r||=�qt|�D�] }t||�d�r:||�j||<�q:|�d�d�ur�d�dd��|d�D���}||d<�|�� |�|�S�)Nr����r ���r����r���c�����������������S���s���g�|�]}t�|��qS�r.���r�����r`����cr.���r.���r/���rc���t��rd���z.HelpFormatter._expand_help.<locals>.<listcomp>) r�����varsrB���r2���r����hasattrr ���r����r&����_get_help_string)r'���r~����paramsr,����choices_strr.���r.���r/���r����k��s����zHelpFormatter._expand_helpc�����������������c���s>���z |j�}W�n�ty���Y�n0�|�����|��E�d�H��|�����d�S�r1���)�_get_subactions�AttributeErrorr[���r\���)r'���r~����get_subactionsr.���r.���r/���rz���x��s���� z'HelpFormatter._iter_indented_subactionsc�����������������C���s&���|�j��d|����}dd�l}|�||�S�)Nr����r���)rQ���r����r�����textwrap�wrap)r'���rp���rV���r����r.���r.���r/���r�������s����zHelpFormatter._split_linesc�����������������C���s,���|�j��d|����}dd�l}|j||||d�S�)Nr����r���)�initial_indent�subsequent_indent)rQ���r����r����r�����fill)r'���rp���rV���r����r����r.���r.���r/���r�������s�����zHelpFormatter._fill_textc�����������������C���s���|j�S�r1���)rx����r'���r~���r.���r.���r/���r�������s����zHelpFormatter._get_help_stringc�����������������C���s ���|j����S�r1���)�dest�upperr����r.���r.���r/���r�������s����z/HelpFormatter._get_default_metavar_for_optionalc�����������������C���s���|j�S�r1���)r����r����r.���r.���r/���r�������s����z1HelpFormatter._get_default_metavar_for_positional)r<���r=���N)N) r ���r6���r7���r8���rW���r[���r\����objectrK���rk���rm���rn���rq���rw���r����r����rj���rg���rr���r����ro���r}���ry���r����r����r����rz���r����r����r����r����r����r.���r.���r.���r/���r�������s>������� `j0 r���c�������������������@���s���e�Zd�ZdZdd��ZdS�)r���z�Help message formatter which retains any formatting in descriptions. Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail. c��������������������s ���d����fdd�|jdd�D���S�)Nre���c�����������������3���s���|�]}��|�V��qd�S�r1���r.���)r`���r�����r����r.���r/���� <genexpr>���rd���z9RawDescriptionHelpFormatter._fill_text.<locals>.<genexpr>T)�keepends)r&���� splitlines)r'���rp���rV���r����r.���r����r/���r�������s����z&RawDescriptionHelpFormatter._fill_textN)r ���r6���r7���r8���r����r.���r.���r.���r/���r������s���r���c�������������������@���s���e�Zd�ZdZdd��ZdS�)r ���z�Help message formatter which retains formatting of all help text. Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail. c�����������������C���s���|����S�r1���)r���)r'���rp���rV���r.���r.���r/���r�������s����z!RawTextHelpFormatter._split_linesN)r ���r6���r7���r8���r����r.���r.���r.���r/���r ������s���r ���c�������������������@���s���e�Zd�ZdZdd��ZdS�)r���z�Help message formatter which adds default values to argument help. Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail. c�����������������C���s>���|j�}d|j�vr:|jtur:ttg}|js2|j|v�r:|d7�}|S�)Nz %(default)� (default: %(default)s))rx���r����r���r���r���r����r����)r'���r~���rx����defaulting_nargsr.���r.���r/���r�������s���� z.ArgumentDefaultsHelpFormatter._get_help_stringN)r ���r6���r7���r8���r����r.���r.���r.���r/���r������s���r���c�������������������@���s ���e�Zd�ZdZdd��Zdd��ZdS�)r ���a��Help message formatter which uses the argument 'type' as the default metavar value (instead of the argument 'dest') Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail. c�����������������C���s���|j�jS�r1����r���r ���r����r.���r.���r/���r�������s����z:MetavarTypeHelpFormatter._get_default_metavar_for_optionalc�����������������C���s���|j�jS�r1���r��r����r.���r.���r/���r�������s����z<MetavarTypeHelpFormatter._get_default_metavar_for_positionalN)r ���r6���r7���r8���r����r����r.���r.���r.���r/���r ������s���r ���c�����������������C���sh���|�d�u�rd�S�|�j�rd�|�j��S�|�jd�tfvr2|�jS�|�jd�tfvrF|�jS�|�jr`dd�|�j��d�S�d�S�d�S�)N�/�{r�����})r����r&���r����r���r����r����)�argumentr.���r.���r/����_get_action_name���s����r��c�������������������@���s ���e�Zd�ZdZdd��Zdd��ZdS�)r���z�An error from creating or using an argument (optional or positional). The string value of this exception is the message, augmented with information about the argument that caused it. c�����������������C���s���t�|�|�_||�_d�S�r1���)r��� argument_name�message)r'���r��r ��r.���r.���r/���rW������s���� zArgumentError.__init__c�����������������C���s(���|�j�d�u�rd}nd}|t|�j|�j�d��S�)Nz%(message)sz'argument %(argument_name)s: %(message)s)r ��r ��)r ��r����r ��)r'���r����r.���r.���r/����__str__���s���� �zArgumentError.__str__N)r ���r6���r7���r8���rW���r��r.���r.���r.���r/���r������s���r���c�������������������@���s���e�Zd�ZdZdS�)r���z@An error from trying to convert a command line string to a type.N)r ���r6���r7���r8���r.���r.���r.���r/���r������s���r���c�������������������@���s4���e�Zd�ZdZddd�Zdd��Zdd ��Zd d d�ZdS�)r���a\ ��Information about how to convert command line strings to Python objects. Action objects are used by an ArgumentParser to represent the information needed to parse a single argument from one or more strings from the command line. The keyword arguments to the Action constructor are also all attributes of Action instances. Keyword Arguments: - option_strings -- A list of command-line option strings which should be associated with this action. - dest -- The name of the attribute to hold the created object(s) - nargs -- The number of command-line arguments that should be consumed. By default, one argument will be consumed and a single value will be produced. Other values include: - N (an integer) consumes N arguments (and produces a list) - '?' consumes zero or one arguments - '*' consumes zero or more arguments (and produces a list) - '+' consumes one or more arguments (and produces a list) Note that the difference between the default and nargs=1 is that with the default, a single value will be produced, while with nargs=1, a list containing a single value will be produced. - const -- The value to be produced if the option is specified and the option uses an action that takes no values. - default -- The value to be produced if the option is not specified. - type -- A callable that accepts a single string argument, and returns the converted value. The standard Python types str, int, float, and complex are useful examples of such callables. If None, str is used. - choices -- A container of values that should be allowed. If not None, after a command-line argument has been converted to the appropriate type, an exception will be raised if it is not a member of this collection. - required -- True if the action must always be specified at the command line. This is only meaningful for optional command-line arguments. - help -- The help string describing the argument. - metavar -- The name to be used for the option's argument with the help string. If None, the 'dest' value will be used as the name. NFc�����������������C���s@���||�_�||�_||�_||�_||�_||�_||�_||�_| |�_| |�_ d�S�r1���� r����r����r�����constr����r���r����r����rx���r�����r'���r����r����r����r ��r����r���r����r����rx���r����r.���r.���r/���rW���4��s����zAction.__init__c��������������������s���g�d�}��fdd�|D��S�)Nr��c��������������������s���g�|�]}|t���|�f�qS�r.�����getattr�r`���r,���r5���r.���r/���rc���W��rd���z&Action._get_kwargs.<locals>.<listcomp>r.����r'����namesr.���r5���r/���r$���J��s����zAction._get_kwargsc�����������������C���s ���|�j�d�S�r9����r����r5���r.���r.���r/���r����Y��s����zAction.format_usagec�����������������C���s���t�td���d�S�)Nz.__call__() not defined)�NotImplementedErrorr�����r'����parser� namespace�valuesr����r.���r.���r/����__call__\��s����zAction.__call__)NNNNNFNN)N)r ���r6���r7���r8���rW���r$���r����r��r.���r.���r.���r/���r�����s���5��������� r���c�����������������������s0���e�Zd�Zd ��fdd� Zd dd�Zdd��Z���ZS�)r���NFc ��������������������s~���g�} |D�]2} | ��| ��| �d�rd| dd����} | ��| ��q|d�ur\|d�ur\|tur\|d7�}t��j| |d||||||d� �d�S�)N�--�--no-r<���r��r���) r����r����r����r����r���r����r����rx���r����)r"���� startswithr����superrW���)r'���r����r����r����r���r����r����rx���r�����_option_stringsr������ __class__r.���r/���rW���`��s&���� �zBooleanOptionalAction.__init__c�����������������C���s$���||�j�v�r t||�j|�d����d�S�)Nr��)r�����setattrr����r��r��r.���r.���r/���r�����s���� zBooleanOptionalAction.__call__c�����������������C���s���d��|�j�S�)Nz | )r&���r����r5���r.���r.���r/���r�������s����z"BooleanOptionalAction.format_usage)NNNFNN)N)r ���r6���r7���rW���r��r����� __classcell__r.���r.���r ��r/���r���_��s���������� r���c�����������������������s(���e�Zd�Zd��fdd� Zddd�Z���ZS�) �_StoreActionNFc��������������������sT���|dkrt�d��|d�ur,|tkr,t�dt���tt|��j||||||||| | d� �d�S�)Nr���z�nargs for store actions must be != 0; if you have nothing to store, actions such as store true or store const may be more appropriate� nargs must be %r to supply constr��)r����r���r��r$��rW���r��r ��r.���r/���rW������s ���� �z_StoreAction.__init__c�����������������C���s���t�||�j|��d�S�r1���)r"��r����r��r.���r.���r/���r�����s����z_StoreAction.__call__)NNNNNFNN)N�r ���r6���r7���rW���r��r#��r.���r.���r ��r/���r$�����s������������r$��c�����������������������s(���e�Zd�Zd��fdd� Zddd�Z���ZS�) �_StoreConstActionNFc�������������� ������s"���t�t|��j||d||||d��d�S�)Nr���)r����r����r����r ��r����r����rx���)r��r'��rW����r'���r����r����r ��r����r����rx���r����r ��r.���r/���rW������s���� �z_StoreConstAction.__init__c�����������������C���s���t�||�j|�j��d�S�r1���)r"��r����r ��r��r.���r.���r/���r�����s����z_StoreConstAction.__call__)NFNN)Nr&��r.���r.���r ��r/���r'�����s��������r'��c�����������������������s���e�Zd�Zd��fdd� Z���ZS�)�_StoreTrueActionFNc��������������������s ���t�t|��j||d|||d��d�S�)NT�r����r����r ��r����r����rx���)r��r)��rW����r'���r����r����r����r����rx���r ��r.���r/���rW������s���� �z_StoreTrueAction.__init__)FFN�r ���r6���r7���rW���r#��r.���r.���r ��r/���r)�����s�������r)��c�����������������������s���e�Zd�Zd��fdd� Z���ZS�)�_StoreFalseActionTFNc��������������������s ���t�t|��j||d|||d��d�S�)NFr*��)r��r-��rW���r+��r ��r.���r/���rW������s���� �z_StoreFalseAction.__init__)TFNr,��r.���r.���r ��r/���r-�����s�������r-��c�����������������������s(���e�Zd�Zd��fdd� Zddd�Z���ZS�) � _AppendActionNFc��������������������sT���|dkrt�d��|d�ur,|tkr,t�dt���tt|��j||||||||| | d� �d�S�)Nr���z�nargs for append actions must be != 0; if arg strings are not supplying the value to append, the append const action may be more appropriater%��r��)r����r���r��r.��rW���r��r ��r.���r/���rW������s ���� �z_AppendAction.__init__c�����������������C���s2���t�||�jd��}t|�}|�|��t||�j|��d�S�r1���)r��r����r;���r"���r"���r'���r��r��r��r����r4���r.���r.���r/���r����s���� z_AppendAction.__call__)NNNNNFNN)Nr&��r.���r.���r ��r/���r.�����s������������r.��c�����������������������s(���e�Zd�Zd��fdd� Zddd�Z���ZS�) �_AppendConstActionNFc�������������� ������s$���t�t|��j||d|||||d��d�S�)Nr���)r����r����r����r ��r����r����rx���r����)r��r0��rW���r(��r ��r.���r/���rW�����s���� �z_AppendConstAction.__init__c�����������������C���s4���t�||�jd��}t|�}|�|�j��t||�j|��d�S�r1���)r��r����r;���r"���r ��r"��r/��r.���r.���r/���r����s����z_AppendConstAction.__call__)NFNN)Nr&��r.���r.���r ��r/���r0�� ��s��������r0��c�����������������������s(���e�Zd�Zd��fdd� Zddd�Z���ZS�) �_CountActionNFc��������������������s ���t�t|��j||d|||d��d�S�)Nr���)r����r����r����r����r����rx���)r��r1��rW���r+��r ��r.���r/���rW���'��s���� �z_CountAction.__init__c�����������������C���s0���t�||�jd��}|d�u�rd}t||�j|d���d�S��Nr���rY���)r��r����r"��)r'���r��r��r��r�����countr.���r.���r/���r��5��s����z_CountAction.__call__)NFN)Nr&��r.���r.���r ��r/���r1��%��s �������r1��c�����������������������s.���e�Zd�Zeedf��fdd� Zddd�Z���ZS�)�_HelpActionNc��������������������s���t�t|��j|||d|d��d�S��Nr���)r����r����r����r����rx���)r��r4��rW���)r'���r����r����r����rx���r ��r.���r/���rW���>��s���� �z_HelpAction.__init__c�����������������C���s���|�����|����d�S�r1���)� print_help�exitr��r.���r.���r/���r��J��s����z_HelpAction.__call__)N�r ���r6���r7���r���rW���r��r#��r.���r.���r ��r/���r4��<��s ����r4��c�����������������������s0���e�Zd�Zdeedf��fdd� Zddd�Z���ZS�)�_VersionActionNz&show program's version number and exitc��������������������s$���t�t|��j|||d|d��||�_d�S�r5��)r��r9��rW����version)r'���r����r:��r����r����rx���r ��r.���r/���rW���Q��s���� �z_VersionAction.__init__c�����������������C���sD���|�j�}|d�u�r|j�}|���}|�|��|�|���tj��|����d�S�r1���)r:���_get_formatterrq����_print_messagerj����_sys�stdoutr7��)r'���r��r��r��r����r:��r]���r.���r.���r/���r��_��s���� z_VersionAction.__call__)Nr8��r.���r.���r ��r/���r9��O��s����r9��c�����������������������sP���e�Zd�ZG�dd��de�Zedddf��fdd� Zdd��Zd d ��Zd dd�Z ���Z S�)�_SubParsersActionc�����������������������s���e�Zd�Z��fdd�Z���ZS�)z&_SubParsersAction._ChoicesPseudoActionc��������������������s@���|�}}|r|dd��|��7�}ttj|��}|jg�|||d��d�S�)Nr����r���)r����r����rx���r����)r&���r��r?���_ChoicesPseudoActionrW���)r'���r,����aliasesrx���r����r�����supr ��r.���r/���rW���m��s���� �z/_SubParsersAction._ChoicesPseudoAction.__init__r,��r.���r.���r ��r/���r@��k��s���r@��FNc�������������� ������s<���||�_�||�_i�|�_g�|�_tt|��j||t|�j|||d��d�S�)N)r����r����r����r����r����rx���r����)�_prog_prefix� _parser_class�_name_parser_map�_choices_actionsr��r?��rW���r���)r'���r����rS����parser_classr����r����rx���r����r ��r.���r/���rW���u��s���� �z_SubParsersAction.__init__c�����������������K���s����|��d�d�u�r d|�j|f�|d<�|�dd�}d|v�rX|�d�}|��|||�}|�j�|��|�jf�i�|��}||�j|<�|D�]}||�j|<�qv|S�)NrS���r����rA��r.���rx���)r����rC��r����r@��rF��r"���rD��rE��)r'���r,����kwargsrA��rx���� choice_actionr���aliasr.���r.���r/���� add_parser���s���� z_SubParsersAction.add_parserc�����������������C���s���|�j�S�r1���)rF��r5���r.���r.���r/���r�������s����z!_SubParsersAction._get_subactionsc�����������������C���s����|d�}|dd���}|�j�tur,t||�j�|��z|�j|�}W�n:�tyt���|d�|�j�d�}td�|�}t|�|��Y�n0�|�|d��\} }t | �� ��D�]\} }t|| |��q�|r�t |��tg���t |t��|��d�S�)Nr���rY���r���)�parser_namer����z5unknown parser %(parser_name)r (choices: %(choices)s))r����r���r"��rE���KeyErrorr&���r����r����parse_known_argsr����r4���� setdefault�_UNRECOGNIZED_ARGS_ATTRr��r����)r'���r��r��r��r����rL��r)���rb����msg�subnamespace�keyr-���r.���r.���r/���r�����s$���� � z_SubParsersAction.__call__)N)r ���r6���r7���r���r@��r���rW���rK��r����r��r#��r.���r.���r ��r/���r?��i��s����r?��c�������������������@���s���e�Zd�Zddd�ZdS�)� _ExtendActionNc�����������������C���s2���t�||�jd��}t|�}|�|��t||�j|��d�S�r1���)r��r����r;���r����r"��r/��r.���r.���r/���r�����s���� z_ExtendAction.__call__)N)r ���r6���r7���r��r.���r.���r.���r/���rT�����s���rT��c�������������������@���s*���e�Zd�ZdZddd�Zdd��Zd d ��ZdS�)r���a���Factory for creating file object types Instances of FileType are typically passed as type= arguments to the ArgumentParser add_argument() method. Keyword Arguments: - mode -- A string indicating how the file is to be opened. Accepts the same values as the builtin open() function. - bufsize -- The file's desired buffer size. Accepts the same values as the builtin open() function. - encoding -- The file's encoding. Accepts the same values as the builtin open() function. - errors -- A string indicating how encoding and decoding errors are to be handled. Accepts the same value as the builtin open() function. �rr����Nc�����������������C���s���||�_�||�_||�_||�_d�S�r1���)�_mode�_bufsize� _encoding�_errors)r'����mode�bufsize�encoding�errorsr.���r.���r/���rW������s����zFileType.__init__c�������������� ������s����|dkrnd��j�v�r*d��j�v�r$tjjS�tjS�t��fdd�dD���rXd��j�v�rRtjjS�tjS�td���j��}t|��zt|��j���j ��j ��j�W�S��ty��}�z*||d�}td �}t ||���W�Y�d�}~n d�}~0�0�d�S�) N�-rU���bc�����������������3���s���|�]}|��j�v�V��qd�S�r1���)rV��r����r5���r.���r/���r�������rd���z$FileType.__call__.<locals>.<genexpr>�waxzargument "-" with mode %r)�filename�errorz$can't open '%(filename)s': %(error)s)rV��r=���stdin�buffer�anyr>��r����r����r����rW��rX��rY���OSErrorr���)r'����stringrQ���erb���r ��r.���r5���r/���r�����s���� � zFileType.__call__c�����������������C���sT���|�j�|�jf}d|�jfd|�jfg}d�dd��|D��dd��|D����}dt|��j|f�S�)Nr\��r]��r���c�����������������S���s���g�|�]}|d�krt�|��qS�)r����)r#���)r`���r+���r.���r.���r/���rc������rd���z%FileType.__repr__.<locals>.<listcomp>c�����������������S���s$���g�|�]\}}|d�urd||f��qS�)Nr���r.���)r`����kwr+���r.���r.���r/���rc������s����r���)rV��rW��rX��rY��r&���r���r ���)r'���rb���rH���args_strr.���r.���r/���r0������s�����zFileType.__repr__)rU��r����NN)r ���r6���r7���r8���rW���r��r0���r.���r.���r.���r/���r������s��� r���c�������������������@���s(���e�Zd�ZdZdd��Zdd��Zdd��ZdS�) r���z�Simple object for storing attributes. Implements equality by attribute names and values, and provides a simple string representation. c�����������������K���s���|D�]}t�|�|||���qd�S�r1���)r"��)r'���rH��r,���r.���r.���r/���rW�����s����zNamespace.__init__c�����������������C���s���t�|t�stS�t|��t|�kS�r1���)r����r����NotImplementedr����)r'����otherr.���r.���r/����__eq__��s���� zNamespace.__eq__c�����������������C���s ���||�j�v�S�r1���)r3���)r'���rS��r.���r.���r/����__contains__��s����zNamespace.__contains__N)r ���r6���r7���r8���rW���rm��rn��r.���r.���r.���r/���r�����s���r���c�����������������������s����e�Zd�Z��fdd�Zdd��Zd&dd�Zdd ��Zd d��Zdd ��Zdd��Z dd��Z dd��Zdd��Zdd��Z dd��Zdd��Zd'dd�Zdd��Zd d!��Zd"d#��Zd$d%��Z���ZS�)(�_ActionsContainerc��������������������s��t�t|������||�_||�_||�_||�_i�|�_|��dd�t ��|��ddt ��|��ddt ��|��ddt��|��ddt��|��ddt ��|��ddt��|��ddt��|��dd t��|��dd t��|��ddt��|��ddt��|�����g�|�_i�|�_g�|�_g�|�_i�|�_t�d �|�_g�|�_d�S�)Nr~����store�store_const� store_true�store_falser"����append_constr3��rx���r:���parsersr����z^-\d+$|^-\d*\.\d+$)r��ro��rW����description�argument_default�prefix_chars�conflict_handler�_registries�registerr$��r'��r)��r-��r.��r0��r1��r4��r9��r?��rT���_get_handler�_actions�_option_string_actions�_action_groups�_mutually_exclusive_groups� _defaultsrN���rO����_negative_number_matcher�_has_negative_number_optionals)r'���rv��rx��rw��ry��r ��r.���r/���rW�����s4����z_ActionsContainer.__init__c�����������������C���s���|�j��|i��}|||<�d�S�r1���)rz��rO��)r'���� registry_namer-���r�����registryr.���r.���r/���r{��S��s����z_ActionsContainer.registerNc�����������������C���s���|�j�|��||�S�r1���)rz��r����)r'���r���r-���r����r.���r.���r/���� _registry_getW��s����z_ActionsContainer._registry_getc�����������������K���s2���|�j��|��|�jD�]}|j|v�r||j�|_qd�S�r1���)r����updater}��r����r����)r'���rH��r~���r.���r.���r/����set_defaults]��s���� z_ActionsContainer.set_defaultsc�����������������C���s8���|�j�D�]"}|j|kr|jd�ur|j��S�q|�j�|d��S�r1���)r}��r����r����r���r����)r'���r����r~���r.���r.���r/����get_defaultf��s���� z_ActionsContainer.get_defaultc�����������������O���sP��|�j�}|r&t|�dkrL|d�d�|vrL|r:d|v�r:td��|�j|i�|��}n|�j|i�|��}d|vr�|d�}||�jv�r�|�j|�|d<�n|�jdur�|�j|d<�|��|�}t|�s�td|f���|f�i�|��}|�� d|j |j �}t|�s�td |f���|tu��rtd |f���t|�d��rFz|�� ���|d��W�n�t�yD���td��Y�n0�|��|�S�) z� add_argument(dest, ..., name=value, ...) add_argument(option_string, option_string, ..., name=value, ...) rY���r���r����z+dest supplied twice for positional argumentr����Nzunknown action "%s"r����%r is not callablez<%r is a FileType class object, instance of it must be passedr;��z,length of metavar tuple does not match nargs)rx��r|���r�����_get_positional_kwargs�_get_optional_kwargsr���rw���_pop_action_class�callabler���r���r���r����r;��r����r�����_add_action)r'���rb���rH���charsr�����action_classr~���� type_funcr.���r.���r/���r����p��s:���� �z_ActionsContainer.add_argumentc�����������������O���s&���t�|�g|�R�i�|��}|�j�|��|S�r1���)�_ArgumentGroupr��r"���)r'���rb���rH��r����r.���r.���r/����add_argument_group���s����z$_ActionsContainer.add_argument_groupc�����������������K���s ���t�|�fi�|��}|�j�|��|S�r1���)�_MutuallyExclusiveGroupr���r"���)r'���rH��r����r.���r.���r/����add_mutually_exclusive_group���s����z._ActionsContainer.add_mutually_exclusive_groupc�����������������C���s`���|���|��|�j�|��|�|_|jD�]}||�j|<�q"|jD�]"}|�j�|�r8|�js8|�j�d��q8|S�)NT) �_check_conflictr}��r"���� containerr����r~��r����matchr���)r'���r~���r����r.���r.���r/���r������s���� z_ActionsContainer._add_actionc�����������������C���s���|�j��|��d�S�r1���)r}���remover����r.���r.���r/����_remove_action���s����z _ActionsContainer._remove_actionc�����������������C���s����i�}|�j�D�].}|j|v�r.td�}t||j���|||j<�q i�}|j�D�]D}|j|vrn|�j|j|j|jd�||j<�|jD�]}||j�||<�qtqD|jD�]&}|�j |j d�}|jD�]}|||<�q�q�|jD�]}|�||��� |��q�d�S�)Nz.cannot merge actions - two groups are named %r)�titlerv��ry��)r����)r��r���r����r����r���rv��ry��r����r���r���r����r}��r����r���)r'���r����title_group_mapr����rQ��� group_mapr~����mutex_groupr.���r.���r/����_add_container_actions���s0���� � � z(_ActionsContainer._add_container_actionsc�����������������K���s^���d|v�rt�d�}t|��|�d�ttfvr2d|d<�|�d�tkrPd|vrPd|d<�t||g�d�S�)Nr����z1'required' is an invalid argument for positionalsr����Tr�����r����r����)r����r����r����r���r���r����)r'���r����rH��rQ��r.���r.���r/���r������s����z(_ActionsContainer._get_positional_kwargsc����������� ������O���s����g�}g�}|D�]`}|d�|�j�vr>||�j�d�}td�}t||���|�|��t|�dkr|d�|�j�v�r|�|��q|�dd��}|d�u�r�|r�|d�}n|d�}|�|�j��}|s�td�}t||���|�dd�}t|||d �S�) Nr���)�optionrx��zNinvalid option string %(option)r: must start with a character %(prefix_chars)rrY���r����z%dest= is required for options like %rr^��r����r���) rx��r����r����r"���r|���r�����lstrip�replacer����) r'���rb���rH��r�����long_option_stringsr����rQ��r�����dest_option_stringr.���r.���r/���r������s.����� z&_ActionsContainer._get_optional_kwargsc�����������������C���s���|��d|�}|��d||�S�)Nr~���)r����r���)r'���rH��r����r~���r.���r.���r/���r�����s����z#_ActionsContainer._pop_action_classc�����������������C���sD���d|�j��}zt|�|�W�S��ty>���td�}t||�j����Y�n0�d�S�)Nz_handle_conflict_%sz%invalid conflict_resolution value: %r)ry��r��r����r����r����)r'����handler_func_namerQ��r.���r.���r/���r|��#��s���� z_ActionsContainer._get_handlerc�����������������C���sL���g�}|j�D�]&}||�jv�r |�j|�}|�||f��q |rH|����}|||��d�S�r1���)r����r~��r"���r|��)r'���r~����confl_optionalsr�����confl_optionalry��r.���r.���r/���r���,��s���� z!_ActionsContainer._check_conflictc�����������������C���s6���t�ddt|��}d�dd��|D���}t|||���d�S�)Nzconflicting option string: %szconflicting option strings: %sr���c�����������������S���s���g�|�]\}}|�qS�r.���r.���)r`���r����r~���r.���r.���r/���rc���>��s����z<_ActionsContainer._handle_conflict_error.<locals>.<listcomp>)r���r|���r&���r���)r'���r~����conflicting_actionsr ���conflict_stringr.���r.���r/����_handle_conflict_error:��s����� �z(_ActionsContainer._handle_conflict_errorc�����������������C���s>���|D�]4\}}|j��|��|�j�|d���|j�s|j�|��qd�S�r1���)r����r���r~��r����r���r���)r'���r~���r���r����r.���r.���r/����_handle_conflict_resolveC��s ����z*_ActionsContainer._handle_conflict_resolve)N)N)r ���r6���r7���rW���r{��r���r���r���r����r���r���r���r���r���r���r���r���r|��r���r���r���r#��r.���r.���r ��r/���ro����s$���5 3(" ro��c�����������������������s6���e�Zd�Zd��fdd� Z��fdd�Z��fdd�Z���ZS�) r���Nc��������������������s����|j�}|d|j��|d|j��|d|j��tt|��j}|f�d|i|���||�_g�|�_|j |�_ |j |�_ |j|�_|j|�_|j |�_ |j|�_d�S�)Nry��rx��rw��rv��)rO��ry��rx��rw��r��r���rW���r���r����rz��r}��r~��r���r���r���)r'���r���r���rv��rH��r���� super_initr ��r.���r/���rW���T��s�����z_ArgumentGroup.__init__c��������������������s ���t�t|���|�}|�j�|��|S�r1���)r��r���r���r����r"���r����r ��r.���r/���r���j��s����z_ArgumentGroup._add_actionc��������������������s ���t�t|���|��|�j�|��d�S�r1���)r��r���r���r����r���r����r ��r.���r/���r���o��s����z_ArgumentGroup._remove_action)NN�r ���r6���r7���rW���r���r���r#��r.���r.���r ��r/���r���R��s���r���c�����������������������s.���e�Zd�Zd��fdd� Zdd��Zdd��Z���ZS�) r���Fc��������������������s ���t�t|���|��||�_||�_d�S�r1���)r��r���rW���r����� _container)r'���r���r����r ��r.���r/���rW���v��s����z _MutuallyExclusiveGroup.__init__c�����������������C���s2���|j�rtd�}t|��|�j�|�}|�j�|��|S�)Nz-mutually exclusive arguments must be optional)r����r����r����r���r���r����r"���)r'���r~���rQ��r.���r.���r/���r���{��s����z#_MutuallyExclusiveGroup._add_actionc�����������������C���s���|�j��|��|�j�|��d�S�r1���)r���r���r����r���r����r.���r.���r/���r������s����z&_MutuallyExclusiveGroup._remove_action)Fr���r.���r.���r ��r/���r���t��s���r���c���������������� �������s,��e�Zd�ZdZddddg�edddddddf ��fdd� Zdd ��Zd d��Zdd ��Zdd��Z dd��Z dAdd�ZdBdd�Zdd��Z dd��Zdd��Zdd��Zdd��Zd d!��Zd"d#��Zd$d%��ZdCd&d'�ZdDd(d)�Zd*d+��Zd,d-��Zd.d/��Zd0d1��Zd2d3��Zd4d5��ZdEd6d7�ZdFd8d9�ZdGd:d;�ZdHd=d>�Z d?d@��Z!���Z"S�)Ir���a)��Object for parsing command line strings into Python objects. Keyword Arguments: - prog -- The name of the program (default: sys.argv[0]) - usage -- A usage message (default: auto-generated from arguments) - description -- A description of what the program does - epilog -- Text following the argument descriptions - parents -- Parsers whose arguments should be copied into this one - formatter_class -- HelpFormatter class for printing help messages - prefix_chars -- Characters that prefix optional arguments - fromfile_prefix_chars -- Characters that prefix files containing additional arguments - argument_default -- The default value for all arguments - conflict_handler -- String indicating how to handle conflicts - add_help -- Add a -h/-help option - allow_abbrev -- Allow long options to be abbreviated unambiguously - exit_on_error -- Determines whether or not ArgumentParser exits with error info when an error occurs Nr^��rb��Tc�������������� ������s&��t�t|��j}|||| | d��|d�u�r6tj�tjd��}||�_||�_ ||�_ ||�_||�_||�_ ||�_| |�_|�j}|td��|�_|td��|�_d�|�_dd��}|��dd�|��d|v�r�dn|d�}|�j r�|�j|d �|d �d�dttd�d ��|D�]:}|��|��z |j}W�n�t�y���Y�q�0�|�j�|��q�d�S�)N)rv��rx��rw��ry��r���zpositional argumentszoptional argumentsc�����������������S���s���|�S�r1���r.���)rg��r.���r.���r/����identity���s����z)ArgumentParser.__init__.<locals>.identityr���r^���hr<���rx���zshow this help message and exit)r~���r����rx���)r��r���rW����_os�path�basenamer=���argvrS���rs����epilog�formatter_class�fromfile_prefix_chars�add_help�allow_abbrev� exit_on_errorr���r�����_positionals� _optionals�_subparsersr{��r����r���r���r���r����r���)r'���rS���rs���rv��r����parentsr���rx��r���rw��ry��r���r���r���� superinit� add_groupr����default_prefixr^����defaultsr ��r.���r/���rW������sH������ zArgumentParser.__init__c��������������������s���g�d�}��fdd�|D��S�)N)rS���rs���rv��r���ry��r���c��������������������s���g�|�]}|t���|�f�qS�r.���r��r��r5���r.���r/���rc������rd���z.ArgumentParser._get_kwargs.<locals>.<listcomp>r.���r��r.���r5���r/���r$������s����zArgumentParser._get_kwargsc����������� ������K���s����|�j�d�ur|��td���|�dt|����d|v�s8d|v�rht|�dd��}t|�dd���}|��||�|�_�n|�j|�_�|�d�d�u�r�|�� ��}|�� ��}|�j}|�|�j ||d��|������|d<�|��|d�}|f�d g�i|��}|�j��|��|S�) Nz(cannot have multiple subparser argumentsrG��r���rv���subcommandsrS���re���ru��r����)r���rb��r����rO��r���r����r���r���r����r;���_get_positional_actionsr���rw���rs���rj���r����r���r���) r'���rH��r���rv��r]���r����ru���� parsers_classr~���r.���r.���r/����add_subparsers���s$���� zArgumentParser.add_subparsersc�����������������C���s$���|j�r|�j�|��n|�j�|��|S�r1���)r����r���r���r���r����r.���r.���r/���r�����s����zArgumentParser._add_actionc�����������������C���s���dd��|�j�D��S�)Nc�����������������S���s���g�|�]}|j�r|�qS�r.���r���r`���r~���r.���r.���r/���rc�����s����z8ArgumentParser._get_optional_actions.<locals>.<listcomp>�r}��r5���r.���r.���r/����_get_optional_actions��s�����z$ArgumentParser._get_optional_actionsc�����������������C���s���dd��|�j�D��S�)Nc�����������������S���s���g�|�]}|j�s|�qS�r.���r��r���r.���r.���r/���rc�����s����z:ArgumentParser._get_positional_actions.<locals>.<listcomp>r���r5���r.���r.���r/���r�����s�����z&ArgumentParser._get_positional_actionsc�����������������C���s4���|���||�\}}|r0td�}|��|d�|����|S��Nzunrecognized arguments: %sr����)rN��r����rb��r&����r'���rb���r��r���rQ��r.���r.���r/���� parse_args ��s ����zArgumentParser.parse_argsc�����������������C���s��|d�u�rt�jdd���}nt|�}|d�u�r.t��}|�jD�]4}|jtur4t||j�s4|jtur4t ||j|j��q4|�j D�] }t||�spt |||�j |���qp|�jr�z|��||�\}}W�q��t y����t����d�}|��t|���Y�q�0�n|��||�\}}t|t��r|�t|t���t|t��||fS�rX���)r=��r���r2���r���r}��r����r���r����r����r"��r���r����_parse_known_argsr����exc_inforb��r����rP��r����r���delattr)r'���rb���r��r~���r�����errr.���r.���r/���rN��'��s0���� zArgumentParser.parse_known_argsc��������������������s��� j�d�ur� ����i���� jD�]R}|j}t|j�D�]<\}}���|g��}|�|d�|����|�||d�d�����q2qi��g�}t��} t| �D�]^\}} | dkr�|�d��| D�]} |�d��q�q�� � | �}|d�u�r�d}n|�|<�d}|�|��q�d� |��t���t���d������ fdd� ������ �fd d �} � �������� �fdd�}g��d � ��r`t ��}nd}� |k�r�t� fdd��D���}� |k�r�|� �}|� k�r�|� �qdn|� � �v�r҈� |��}��|��|� | � �� �qd|� �}���|d�����g�}� jD�]|}|�v�r|j�r(|�t|���nT|jd�u�rt|jt��rt�|j��r|jt�|j�u��rt�|j� �||j����q|�r�� �td�d� |����� jD�]X}|j�r�|jD�]}|�v��r���q��q�dd��|jD��}td�}� �|d� |�����q���fS�)NrY���r��r^���A�Ore���c��������������������s|������|�����|�|�}||�jurb���|������|�g��D�]*}|�v�r6td�}t|�}t|�||���q6|turx|���||��d�S�)Nznot allowed with argument %s)r�����_get_valuesr����r����r����r��r���r���)r~����argument_stringsr�����argument_values�conflict_actionrQ���action_name)�action_conflictsr���seen_actions�seen_non_default_actionsr'���r.���r/����take_action}��s���� z5ArgumentParser._parse_known_args.<locals>.take_actionc��������������������s~���|��}|\}}}�j�}g�}|d�u�r:����|����|�d�S�|d�u�r||d�}�j}|dkr�|d�|vr�|�|g�|f��|d�} | |d��}|dd���p�d�} �j}||v�r�||�}| }ntd�}t|||���nB|dkr�|�d�} |g}|�|||f���q\ntd�}t|||���q|�d�}�|d���}|||�}||�} ��|| ��}|�|||f���q\q|D�]\}}}�|||���q`| S�)NrY���r���r���zignored explicit argument %r)�_match_argumentr"���rx��r~��r����r���)�start_index�option_tupler~���r�����explicit_arg�match_argument� action_tuples� arg_countr����char�new_explicit_arg� optionals_maprQ���stoprb���r�����selected_patterns)r)����arg_strings_pattern�extras�option_string_indicesr'���r���r.���r/����consume_optional���sL���� z:ArgumentParser._parse_known_args.<locals>.consume_optionalc��������������������sn����j�}�|�d���}|�|�}t�|�D�]*\}}��|�|�|���}|�|7�}��||��q&�t|�d����d�d��<�|�S�r1���)�_match_arguments_partial�zipr|���)r���� match_partial�selected_pattern� arg_countsr~���r���rb���)r)���r���r����r'���r���r.���r/����consume_positionals���s���� z=ArgumentParser._parse_known_args.<locals>.consume_positionalsr���r����c��������������������s���g�|�]}|��kr|�qS�r.���r.���)r`���r����)r���r.���r/���rc������s����z4ArgumentParser._parse_known_args.<locals>.<listcomp>z(the following arguments are required: %sr���c�����������������S���s���g�|�]}|j�turt|��qS�r.���)rx���r���r��r���r.���r.���r/���rc���;��s��� �z#one of the arguments %s is requiredr����)N)r����_read_args_from_filesr���r����r����rO��r�����iterr"����_parse_optionalr&���r����r���rE���rD���r}��r����r��r����r����r����r����r����r��r"��� _get_valuerb��r����)r'���r)���r��r���r����r�����mutex_action� conflicts�arg_string_pattern_parts�arg_strings_iter� arg_stringr����patternr���r����max_option_string_index�next_option_string_index�positionals_end_index�strings� stop_index�required_actionsr~���r����r��rQ��r.���)r���r)���r���r���r��r���r����r���r���r'���r���r���r/���r���N��s����� J � � ��� � �z ArgumentParser._parse_known_argsc�������������� ���C���s����g�}|D�]�}|r|d�|�j�vr*|�|��qzxt|dd�����T}g�}|������D�]}|��|�D�]}|�|��q\qN|��|�}|�|��W�d�����n1�s�0����Y��W�q�ty����t � ��d�}|��t|���Y�q0�q|S�r2��) r���r"���r�����readr����convert_arg_line_to_argsr���r����rf��r=��r���rb��r����)r'���r)����new_arg_stringsr���� args_file�arg_liner+���r���r.���r.���r/���r���D��s ���� ,z$ArgumentParser._read_args_from_filesc�����������������C���s���|gS�r1���r.���)r'���r��r.���r.���r/���r��^��s����z'ArgumentParser.convert_arg_line_to_argsc�����������������C���sz���|���|�}t�||�}|d�u�rld�td�ttd�ttd�i}|�|j�}|d�u�rbtdd|j�|j�}t ||��t |�d��S�)Nzexpected one argumentzexpected at most one argumentzexpected at least one argumentzexpected %s argumentzexpected %s argumentsrY���)�_get_nargs_patternrN���r���r����r���r ���r����r����r���r���r|���r����)r'���r~���r���� nargs_patternr����nargs_errorsrQ��r.���r.���r/���r���a��s"���� ��� zArgumentParser._match_argumentc��������������������sr���g�}t�t|�dd�D�]X}|d�|��}d���fdd�|D���}t�||�}|d�ur|�dd��|���D�����qnq|S�)Nr���r����re���c��������������������s���g�|�]}����|��qS�r.���)r ��r���r5���r.���r/���rc���}��s����z;ArgumentParser._match_arguments_partial.<locals>.<listcomp>c�����������������S���s���g�|�]}t�|��qS�r.���)r|���)r`���rg��r.���r.���r/���rc������rd���)r����r|���r&���rN���r���r����ru���)r'���rt���r���r����r����� actions_slicer���r���r.���r5���r/���r���w��s�����z'ArgumentParser._match_arguments_partialc����������� ������C���s��|sd�S�|d�|�j�vrd�S�||�jv�r8|�j|�}||d�fS�t|�dkrHd�S�d|v�r~|�dd�\}}||�jv�r~|�j|�}|||fS�|��|�}t|�dkr�d�dd��|D���}||d�}td�}|��||���nt|�dkr�|\} | S�|�j� |�r�|�j s�d�S�d |v��rd�S�d�|d�fS�) Nr���rY����=r���c�����������������S���s���g�|�]\}}}|�qS�r.���r.���)r`���r~���r����r���r.���r.���r/���rc������s����z2ArgumentParser._parse_optional.<locals>.<listcomp>)r����matchesz4ambiguous option: %(option)s could match %(matches)sr����)rx��r~��r|����split�_get_option_tuplesr&���r����rb��r���r���r���) r'���r���r~���r����r���� option_tuples�optionsrb���rQ��r���r.���r.���r/���r������s>���� � zArgumentParser._parse_optionalc����������� ������C���s0��g�}|�j�}|d�|v�r�|d�|v�r�|�jr~d|v�rB|�dd�\}}n|}d�}|�jD�],}|�|�rP|�j|�}|||f}|�|��qPn�|d�|v��r|d�|v�r|}d�}|d�d��}|dd���} |�jD�]T}||kr�|�j|�}||| f}|�|��q�|�|�r�|�j|�}|||f}|�|��q�n|��td�|���|S�)Nr���rY���r ��r<���zunexpected option string: %s)rx��r���r��r~��r��r"���rb��r����) r'���r����r����r���� option_prefixr���r~���r�����short_option_prefix�short_explicit_argr.���r.���r/���r�����s:���� z!ArgumentParser._get_option_tuplesc�����������������C���s����|j�}|d�u�rd}nf|tkr"d}nX|tkr0d}nJ|tkr>d}n<|tkrLd}n.|tkrZd}n |tkrhd}ndd �d |���}|jr�|� d d�}|� dd�}|S�) Nz(-*A-*)z(-*A?-*)z (-*[A-]*)z (-*A[A-]*)z([-AO]*)z(-*A[-AO]*)z(-*-*)z(-*%s-*)z-*r���re���r^��) r����r���r���r ���r���r���r���r&���r����r���)r'���r~���r����r ��r.���r.���r/���r �����s(����z!ArgumentParser._get_nargs_patternc�����������������C���s4���|���||�\}}|r0td�}|��|d�|����|S�r���)�parse_known_intermixed_argsr����rb��r&���r���r.���r.���r/����parse_intermixed_args ��s ����z$ArgumentParser.parse_intermixed_argsc�������������� ������s���|�������dd����D��}|r,td|d�j�����fdd�|�jD��rHtd���z�|�j}z�|�jd�u�rp|����dd���|�_��D�] }|j|_t|_|j|_ t|_qt|�� ||�\}}��D�]J}t||j�r�t ||j�g�kr�ddlm}�|d |j|f���t||j��q�W���D�]}|j|_|j |_q�n��D�]}|j|_|j |_�q0�|����}zt|D�]}|j|_d |_�q@|�jD�]} | j| _d | _�q\|�� ||�\}} W�|D�]}|j|_�q�|�jD�]} | j| _�q�n,|D�]}|j|_�q�|�jD�]} | j| _�q�0�W�||�_n||�_0�|| fS�)Nc�����������������S���s���g�|�]}|j�ttfv�r|�qS�r.���)r����r���r���r���r.���r.���r/���rc���4 ��s����z>ArgumentParser.parse_known_intermixed_args.<locals>.<listcomp>z3parse_intermixed_args: positional arg with nargs=%sr���c��������������������s&���g�|�]}|j�D�]}|��v�r|j�qqS�r.���)r����r����)r`���r����r~����r����r.���r/���rc���: ��s����z;parse_intermixed_args: positional in mutuallyExclusiveGroup����)�warnzDo not expect %s in %sF)r���r����r����r���rs���r����� save_nargsr���r�����save_defaultrN��r����r����r���warningsr��r���r���r����� save_required)r'���rb���r���a� save_usager~����remaining_argsr��r����r����r���r.���r��r/���r��& ��sn���� � ��� � � z*ArgumentParser.parse_known_intermixed_argsc��������������������s�����j�ttfvr0z|�d��W�n�ty.���Y�n0�|sx��j�tkrx��jrL��j}n��j}t |t �rt����|�}����|���n|s���j�t kr���js���jd�ur���j}n|}����|��n�t|�dkr��j�d�tfv�r�|\}����|�}����|��n���j�tk�r���fdd�|D��}np��j�tk�r>���fdd�|D��}����|d���n>��j�tk�rPt}n,���fdd�|D��}|D�]}����|���qh|S�)Nr��rY���c��������������������s���g�|�]}�����|��qS�r.����r����r`����v�r~���r'���r.���r/���rc���� ��rd���z.ArgumentParser._get_values.<locals>.<listcomp>c��������������������s���g�|�]}�����|��qS�r.���r"��r#��r%��r.���r/���rc���� ��rd���r���c��������������������s���g�|�]}�����|��qS�r.���r"��r#��r%��r.���r/���rc���� ��rd���)r����r���r���r���r����r���r����r ��r����r����r����r����_check_valuer���r|���r���)r'���r~���r)���r-���r���r$��r.���r%��r/���r���s ��sD���� � zArgumentParser._get_valuesc�������������� ���C���s����|���d|j|j�}t|�s0td�}t|||���z||�}W�n��ty|���t|jdt|j��}tt � ��d��}t||��Y�nJ�ttfy����t|jdt|j��}||d�}td�}t|||���Y�n0�|S�)Nr���r���r ���rY���)r���r-���z!invalid %(type)s value: %(value)r) r���r���r���r����r���r���r��r#���r����r=��r���r����r����)r'���r~���r���r���rQ��r����r,���rb���r.���r.���r/���r���� ��s ���� zArgumentParser._get_valuec�����������������C���sF���|j�d�urB||j�vrB|d�tt|j���d�}td�}t|||���d�S�)Nr���)r-���r����z3invalid choice: %(value)r (choose from %(choices)s))r����r&���r{���r#���r����r���)r'���r~���r-���rb���rQ��r.���r.���r/���r&��� ��s�����zArgumentParser._check_valuec�����������������C���s$���|�����}|�|�j|�j|�j��|���S�r1���)r;��rw���rs���r}��r���rj���)r'���r]���r.���r.���r/���r����� ��s �����zArgumentParser.format_usagec�����������������C���st���|�����}|�|�j|�j|�j��|�|�j��|�jD�]0}|�|j ��|�|j��|� |j��|����q.|�|�j ��|���S�r1���)r;��rw���rs���r}��r���rq���rv��r��rm���r���r����r����rn���r���rj���)r'���r]����action_groupr.���r.���r/���rj���� ��s����� zArgumentParser.format_helpc�����������������C���s���|�j�|�jd�S�)Nr����)r���rS���r5���r.���r.���r/���r;��� ��s����zArgumentParser._get_formatterc�����������������C���s"���|d�u�rt�j}|��|����|��d�S�r1���)r=��r>��r<��r�����r'����filer.���r.���r/����print_usage� ��s����zArgumentParser.print_usagec�����������������C���s"���|d�u�rt�j}|��|����|��d�S�r1���)r=��r>��r<��rj���r(��r.���r.���r/���r6��� ��s����zArgumentParser.print_helpc�����������������C���s ���|r|d�u�rt�j}|�|��d�S�r1���)r=���stderr�write)r'���r ��r)��r.���r.���r/���r<��� ��s����zArgumentParser._print_messager���c�����������������C���s ���|r|���|tj��t�|��d�S�r1���)r<��r=��r+��r7��)r'����statusr ��r.���r.���r/���r7�� ��s����zArgumentParser.exitc�����������������C���s0���|���tj��|�j|d�}|��dtd�|���dS�)z�error(message: string) Prints a usage message incorporating the message to stderr and exits. If you override this in a subclass, it should not return -- it should either exit or raise an exception. )rS���r ��r<���z%(prog)s: error: %(message)s N)r*��r=��r+��rS���r7��r����)r'���r ��rb���r.���r.���r/���rb�� ��s���� zArgumentParser.error)NN)NN)NN)NN)N)N)N)r���N)#r ���r6���r7���r8���r���rW���r$���r���r���r���r���r���rN��r���r���r��r���r���r���r��r ��r��r��r���r���r&��r����rj���r;��r*��r6��r<��r7��rb��r#��r.���r.���r ��r/���r������sX����B '�w:-1 M8 r���)2r8����__version__�__all__�osr����rerN����sysr=��r���r����r���r���r���r���r ���r���r���rP��r����r���r;���r���r���r ���r���r ���r��� Exceptionr���r���r���r���r$��r'��r)��r-��r.��r0��r1��r4��r9��r?��rT��r���r���ro��r���r���r���r.���r.���r.���r/����<module>���s`���=���� ^)#&]7��8"