QfxdZdZgdZddlZddlZddlZddl Z ddl m Z m Z dZ dZdZd Zd Zd Zd ZGd deZdZGddeZGddeZGddeZGddeZGddeZdZGddeZGddeZGdd eZ eZ!Gd!d"e Z"Gd#d$e Z#Gd%d&e Z$Gd'd(e$Z%Gd)d*e$Z&Gd+d,e Z'Gd-d.e Z(Gd/d0e Z)Gd1d2e Z*Gd3d4e Z+Gd5d6e Z,Gd7d8e'Z-Gd9d:eZ.Gd;deZ0Gd?d@e0Z1GdAdBe1Z2GdCdDee0Z3y)Ea 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 ArgumentErrorArgumentTypeErrorBooleanOptionalActionFileType HelpFormatterArgumentDefaultsHelpFormatterRawDescriptionHelpFormatterRawTextHelpFormatterMetavarTypeHelpFormatter NamespaceAction ONE_OR_MOREOPTIONALPARSER REMAINDERSUPPRESS ZERO_OR_MOREN)gettextngettextz ==SUPPRESS==?*+zA......_unrecognized_argsc"eZdZdZdZdZdZy)_AttributeHolderaAbstract 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__. ct|j}g}i}|jD]}|jt ||j D]1\}}|j r|j|d|-|||<3|r|jdt |z|ddj|dS)N=z**%s(, ))type__name__ _get_argsappendrepr _get_kwargs isidentifierjoin)self type_name arg_strings star_argsargnamevalues //opt/alt/python312/lib64/python3.12/argparse.py__repr__z_AttributeHolder.__repr__vsJ''   >>#C   tCy )$++-KD%  """dE#:;"' $ .    vY7 8$dii &<==cHt|jjSN)list__dict__itemsr+s r2r(z_AttributeHolder._get_kwargssDMM'')**r4cgSr6r:s r2r%z_AttributeHolder._get_argss r4N)r$ __module__ __qualname____doc__r3r(r%r<r4r2rrms >+r4rc`|gSt|tur|ddSddl}|j|SNr)r#r7copy)r9rBs r2 _copy_itemsrCs5 }  E{dQx 99U r4ceZdZdZ ddZdZdZGddeZdZ d Z d Z d Z d d Z d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy)!rzFormatter 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|#ddl}|jj}|dz}||_||_t |t |dz |dz|_||_d|_ d|_ d|_ |j|d|_ |j|_tj dtj"|_tj d|_y)Nrz\s+z\n\n\n+)shutilget_terminal_sizecolumns_prog_indent_incrementminmax_max_help_position_width_current_indent_level_action_max_length_Section _root_section_current_section_recompileASCII_whitespace_matcher_long_break_matcher)r+progindent_incrementmax_help_positionwidthrHs r2__init__zHelpFormatter.__init__s = ,,.66E QJE !1"%&7&)%"*6F6J&K#M   "#!]]46 $ 2 2#&;;vsyy#A #&;;z#: r4cl|xj|jz c_|xjdz c_yNrQrLrRr:s r2_indentzHelpFormatter._indents'  6 66 q r4cl|xj|jzc_|xjdzc_yrbrdr:s r2_dedentzHelpFormatter._dedents'  6 66 q r4ceZdZddZdZy)HelpFormatter._SectionNc<||_||_||_g|_yr6) formatterparentheadingr9)r+rkrlrms r2r`zHelpFormatter._Section.__init__s&DN DK"DLDJr4c |j|jj|jj}||jDcgc] \}}|| c}}}|j|jj |sy|j turM|j A|jj}tdt|j z}d|d|fz}nd}|d||dgScc}}w)Nz %(heading)s:)rm%*s%s  ) rlrkre _join_partsr9rgrmrrQ_dict)r+r*funcargs item_helpcurrent_indent heading_textrms r2 format_helpz"HelpFormatter._Section.format_helps{{&&&(>>--DDJJGJjdDdDkJGHI{{&&&(||8+ 0H!%!?!? 04 3MM #~r<&HHw 489 9#HsC; r6)r$r=r>r`rzr<r4r2rTris    :r4rTcR|jjj||fyr6)rVr9r&)r+rurvs r2 _add_itemzHelpFormatter._add_items  ##**D$<8r4c|j|j||j|}|j|jg||_yr6)rerTrVr|rz)r+rmsections r2 start_sectionzHelpFormatter.start_sections? --d&;&;WE w**B/ 'r4cZ|jj|_|jyr6)rVrlrgr:s r2 end_sectionzHelpFormatter.end_sections $ 5 5 < < r4cV|tur!||j|j|gyyyr6)rr| _format_text)r+texts r2add_textzHelpFormatter.add_texts- x D$4 NN4,,tf 5%5 r4cZ|tur#||||f}|j|j|yyr6)rr| _format_usage)r+usageactionsgroupsprefixrvs r2 add_usagezHelpFormatter.add_usages1  '661D NN4--t 4 !r4cn|jtur|j}||g}|j|D]}|j ||t t t|}||jz}t |j||_ |j|j|gyyr6) helpr_format_action_invocation_iter_indented_subactionsr&rNmaplenrQrSr|_format_action)r+actionget_invocation invocations subactioninvocation_length action_lengths r2 add_argumentzHelpFormatter.add_arguments ;;h &";;N)&12K!;;FC "">)#<=D!$C[$9 : -0D0DDM&)$*A*A*7'9D # NN4.. 9 'r4c4|D]}|j|yr6)r)r+rrs r2 add_argumentszHelpFormatter.add_argumentssF   f %r4c|jj}|r0|jjd|}|j ddz}|S)N rq)rUrzr[substrip)r+rs r2rzzHelpFormatter.format_helpsI!!--/ ++//=D::d#d*D r4c^dj|Dcgc]}|r |tur|c}Scc}w)Nro)r*r)r+ part_stringsparts r2rrzHelpFormatter._join_parts%s=ww$0:$0DD$8$0:; ;:s*c| td}||t|jz}n||sdt|jz}n|dt|jz}g}g}|D]1}|jr|j |!|j |3|j } | ||z|} dj || fD cgc]} | s|  c} }|j|jz t|t|zkDr1d} | ||} | ||}tj| | }tj| |}d fd }t|t|zdzkr[dt|t|zdzz}|r'||g|z||}|j|||nw|r||g|z||}nf|g}nbdt|z}||z}|||}t|dkDr2g}|j||||j||||g|z}d j |}||d Scc} w) Nzusage: r\z%(prog)s z%\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+cg}g}t|}|t|dz }n|dz }|D]d}|dzt|zkDr,|r*|j|dj|zg}|dz }|j||t|dzz }f|r#|j|dj|z| |d|d|d<|S)Nrcrr)rr&r*) partsindentrlinesline indent_lengthline_lenr text_widths r2 get_linesz.HelpFormatter._format_usage..get_linesZsED$'KM)#&v;?#01#4 %#a<#d)3j@T!LL#((4.)@A#%D'4q'8H D) CIM1 !& Vchhtn%<=)#(8MN#;a Lr4g?rcrqrr6) rsrtrKoption_stringsr&_format_actions_usager*rPrQrrWfindallextend)r+rrrrr\ optionals positionalsrformat action_usages part_regexp opt_usage pos_usage opt_parts pos_partsrrrrrs @r2rzHelpFormatter._format_usage*sb >y\F  Ddjj11E]74::!66E]$** 55DIK!(($$V,&&v. "//F!)k"96BLHH$ )=C)=Aa)=CDEt';';;J6{SZ'*4 #9f5 ";7 KK Y? KK Y? !,v;T*dZ.?? CK#d)$;a$?@F )4&9*&))=)=%>"005%)=)==/0,"'"6"6%))&1!;;(2494#7 -?AY,Y)0  >> G+#ENd2N-0GEN'>#CLC/L+.GCL.2 G+#ENd2N-0GEN'>#CLC/L+.GCL"519c2%( 3SZ"7+IAv{{h& T";;q>S(KKN[[Q'3.KKA&**BB6J((9]*Aw#~$r(c/#Abz T"!' 5 5a 8 <<1$!..0D #DDVLG"&"3"3FG"DK&3[AD6+F!D=D T"[,`.A!!*E!AJ/xx%D%$43C%DEwwx$t4wwx%'5wwD%0#t<zz| O  xEsMM M  MMcd|vr|t|jz}t|j|jz d}d|jz}|j |||dzS)Nz%(prog)r rr)rtrKrNrPrQ _fill_text)r+rrrs r2rzHelpFormatter._format_texts`  $DJJ//Dt';';;R@ t+++tZ86AAr4c`t|jdz|j}t|j|z d}||j z dz }|j |}|js|j d|f}d|z}n {{&&M9C%OM < /&&L-GC'#-ML&&M9C%OM(L ;;6;;,,.))&1I!..y*E  Y,JqM)JJK&qrNDLLmR-F!FG+''- LL 77?I LL,,Y7 8@&&r4c|js-|j|}|j||d\}|Sg}|jdk(r|j |jnJ|j |}|j ||}|jD]}|j|d|dj|S)Nrcrrr!) rr_metavar_formatterrrrrr&r*)r+rrmetavarrrrs r2rz'HelpFormatter._format_action_invocation5s$$>>vFG?t..vw?BHGNE||q  V223 @@H"//@ %+%:%:MLLM;!GH&;99U# #r4c|j |jnE|j7|jDcgc] }t|}}ddj|zn|fd}|Scc}w)Nz{%s},c4ttrSf|zSr6) isinstancetuple) tuple_sizeresults r2rz0HelpFormatter._metavar_formatter..formatVs&%( zJ..r4)rchoicesstrr*)r+rdefault_metavarchoice choice_strsrrs @r2rz HelpFormatter._metavar_formatterMsf >> %^^F ^^ '5;^^D^63v;^KDchh{33F$F /  EsA'c|j||}|j d|dz}|S|jtk(r d|dz}|S|jtk(r$|d}t |dk(rd|z}|Sd|z}|S|jt k(r d|dz}|S|jt k(rd}|S|jtk(r d |dz}|S|jtk(rd }|S t|jDcgc]}d}}d j|||jz}|Scc}w#t$r td dwxYw) Nz%srcrrFz [%s [%s ...]]z[%s ...]z %s [%s ...]rz%s ...rozinvalid nargs valuer) rrrrrrrrrr TypeErrorrr*)r+rr get_metavarrrrsformatss r2rzHelpFormatter._format_args]s--foF << KN*F. -\\X %k!n,F* )\\\ )!!nG7|q (72" $g- \\[ ("[^3F \\Y &F \\V # A.F \\X %F  B).v||)<=) B !67TA Bs2D? D:D?:D??Ectt||j}t|D]}||tus||=t|D]$}t ||ds||j ||<&|jd0dj|dDcgc] }t|c}}||d<|j||zScc}w)Nrr$rr!) rtvarsrKr7rhasattrr$rr*r_get_help_string)r+rparamsr0c choices_strs r2rzHelpFormatter._expand_helpysd6l4LDd|x'4L!LDvd|Z0%d|44t ! ::i ,))VI5F$G5FSV5F$GHK +F9 $$V,v55%HsCc#K |j}|j|Ed{|jy7#t$rYywxYwwr6)_get_subactionsrergAttributeError)r+rget_subactionss r2rz'HelpFormatter._iter_indented_subactionssN #33N LLN%' ' ' LLN (    s1A AAAA A A AAc|jjd|j}ddl}|j ||S)Nrr)rZrrtextwrapwrap)r+rr_rs r2rzHelpFormatter._split_liness9''++C6<<> }}T5))r4c|jjd|j}ddl}|j ||||S)Nrr)initial_indentsubsequent_indent)rZrrrfill)r+rr_rrs r2rzHelpFormatter._fill_textsF''++C6<<>}}T5,2/57 7r4c|jSr6)rr+rs r2r zHelpFormatter._get_help_string {{r4c6|jjSr6)destupperrs r2rz/HelpFormatter._get_default_metavar_for_optionals{{  ""r4c|jSr6)rrs r2rz1HelpFormatter._get_default_metavar_for_positionalrr4)rFNr6) r$r=r>r?r`rergobjectrTr|rrrrrrrzrrrrrrrrrrrrrr rrr<r4r2rrs#$#% ;> :6:@9 ( 65 :$&; _,BqfB.'`$0 8 6*7#r4rceZdZdZdZy)r zHelp 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. cXdjfd|jdDS)Nroc3(K|] }|z ywr6r<).0rrs r2 z9RawDescriptionHelpFormatter._fill_text..sP1Ov}1OsT)keepends)r* splitlines)r+rr_rs `r2rz&RawDescriptionHelpFormatter._fill_texts#wwP$1OPPPr4N)r$r=r>r?rr<r4r2r r s  Qr4r ceZdZdZdZy)r zHelp 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"|jSr6)r()r+rr_s r2rz!RawTextHelpFormatter._split_liness  r4N)r$r=r>r?rr<r4r2r r s  !r4r ceZdZdZdZy)rzHelp 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|j}|d}d|vrF|jtur4ttg}|j s|j |vr|tdz }|S)a6 Add the default value to the option help message. ArgumentDefaultsHelpFormatter and BooleanOptionalAction when it isn't already present. This code will do that, detecting cornercases to prevent duplicates or cases where it wouldn't make sense to the end user. roz %(default)z (default: %(default)s))rrrrrrrrs)r+rrdefaulting_nargss r2r z.ArgumentDefaultsHelpFormatter._get_help_strings`{{ <D t #~~X-$,l#; ((FLLr?r r<r4r2rrs  r4rceZdZdZdZdZy)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.|jjSr6r#r$rs r2rz:MetavarTypeHelpFormatter._get_default_metavar_for_optional{{###r4c.|jjSr6r0rs r2rzr?rrr<r4r2r r s$$r4r c2|y|jrdj|jS|jdtfvr |jS|jdtfvr |jS|j r!ddj|j zdzSy)N/{r})rr*rrrr)arguments r2_get_action_namer8s  xx//00   $!1 1 tX. .}}   SXXh..//#55r4ceZdZdZdZdZy)rzAn 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. c2t||_||_yr6)r8 argument_namemessage)r+r7r<s r2r`zArgumentError.__init__s-h7 r4c~|jd}n td}|t|j|jzS)Nz %(message)sz'argument %(argument_name)s: %(message)s)r<r;)r;rsrtr<)r+rs r2__str__zArgumentError.__str__sA    %"F@AFT\\+/+=+=?? ?r4N)r$r=r>r?r`r>r<r4r2rrs ?r4rceZdZdZy)rz@An error from trying to convert a command line string to a type.N)r$r=r>r?r<r4r2rrsJr4rc<eZdZdZ ddZdZdZddZy) 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. Nc ||_||_||_||_||_||_||_||_| |_| |_ yr6 rrrconstrr#rrrr) r+rrrrCrr#rrrrs r2r`zAction.__init__MsK-          r4cLgd}|Dcgc]}|t||fc}Scc}w)NrBgetattrr+namesr0s r2r(zAction._get_kwargscs/  9>>wtT*+>>>!c |jdSrA)rr:s r2rzAction.format_usagers""1%%r4c*ttd)Nz.__call__() not defined)NotImplementedErrorrsr+parser namespacevaluesrs r2__call__zAction.__call__us!!$=">??r4NNNNNFNNr6)r$r=r>r?r`r(rrQr<r4r2r r s70j, ?&@r4r c:eZdZdeeddeffd ZddZdZxZS)rNFc bg} |D]>} | j| | jds&d| ddz} | j| @dD].} t| tust j | dd0|turd}|turd}|turd}t || |d|||||| y) N----no-rF)r#rrzP{name!r} is deprecated as of Python 3.12 and will be removed in Python {remove}.))remover) rrrrr#rrrr)r& startswithlocals_deprecated_defaultwarnings _deprecatedsuperr`) r+rrrr#rrrr_option_stringsr field_name __class__s r2r`zBooleanOptionalAction.__init__}s+M  " "= 1''- '-*; ; &&}5 ,9Jx #+>>$$2" $9 & &D ) )G ) )G *  r4cp||jvr(t||j|jd yy)NrV)rsetattrrrZrMs r2rQzBooleanOptionalAction.__call__s3 D// / Ityym.F.Fw.O*O P 0r4c8dj|jS)Nz | )r*rr:s r2rz"BooleanOptionalAction.format_usageszz$--..r4r6)r$r=r>r\r`rQr __classcell__rbs@r2rr|s(),,-`Q/r4rc8eZdZ dfd ZddZxZS) _StoreActionc |dk(r td||tk7rtdtztt|||||||||| |  y)Nrznargs 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 constrB)rrr_rir` r+rrrrCrr#rrrrrbs r2r`z_StoreAction.__init__ss A:KL L  (!2?(JK K lD*) + r4c2t||j|yr6)rdrrMs r2rQz_StoreAction.__call__s 499f-r4rRr6r$r=r>r`rQrfrgs@r2riris' :.r4ric2eZdZ dfd ZddZxZS)_StoreConstActionc :tt| ||d||||y)Nr)rrrrCrrr)r_rpr` r+rrrCrrrrrbs r2r`z_StoreConstAction.__init__s/ /) 0 r4cFt||j|jyr6)rdrrCrMs r2rQz_StoreConstAction.__call__s 499djj1r4NNFNNr6rnrgs@r2rprps "2r4rpc&eZdZ dfd ZxZS)_StoreTrueActionc8tt| ||d|||y)NTrrrCrrr)r_rvr`r+rrrrrrbs r2r`z_StoreTrueAction.__init__s, .) / r4)FFNr$r=r>r`rfrgs@r2rvrvs   r4rvc&eZdZ dfd ZxZS)_StoreFalseActionc8tt| ||d|||y)NFrx)r_r|r`rys r2r`z_StoreFalseAction.__init__s, /) 0 r4)TFNrzrgs@r2r|r|s   r4r|c8eZdZ dfd ZddZxZS) _AppendActionc |dk(r td||tk7rtdtztt|||||||||| |  y)Nrznargs for append actions must be != 0; if arg strings are not supplying the value to append, the append const action may be more appropriaterkrB)rrr_rr`rls r2r`z_AppendAction.__init__ss A:OP P  (!2?(JK K mT+) , r4ct||jd}t|}|j|t ||j|yr6)rFrrCr&rdr+rNrOrPrr9s r2rQz_AppendAction.__call__0: 499d3E" V 499e,r4rRr6rnrgs@r2rrs' :-r4rc2eZdZ dfd ZddZxZS)_AppendConstActionc <tt| ||d|||||y)Nr)rrrrCrrrr)r_rr`rrs r2r`z_AppendConstAction.__init__9s2  $0) 1 r4ct||jd}t|}|j|jt ||j|yr6)rFrrCr&rCrdrs r2rQz_AppendConstAction.__call__Ks> 499d3E" TZZ  499e,r4rtr6rnrgs@r2rr7s $-r4rc.eZdZ dfd ZddZxZS) _CountActionc8tt| ||d|||y)Nr)rrrrrr)r_rr`rys r2r`z_CountAction.__init__Ts+ lD*) + r4cnt||jd}|d}t||j|dzy)Nrrc)rFrrd)r+rNrOrPrcounts r2rQz_CountAction.__call__bs2 499d3 =E 499eai0r4)NFNr6rnrgs@r2rrRs  1r4rc.eZdZeedffd ZddZxZS) _HelpActionNc6tt| |||d|y)Nrrrrrr)r_rr`)r+rrrrrbs r2r`z_HelpAction.__init__ks( k4)) * r4cD|j|jyr6) print_helpexitrMs r2rQz_HelpAction.__call__ws r4r6r$r=r>rr`rQrfrgs@r2rris! r4rc0eZdZdeedffd ZddZxZS)_VersionActionNc^| td}tt||||d|||_y)Nz&show program's version number and exitrr)rsr_rr`version)r+rrrrrrbs r2r`z_VersionAction.__init__~sA <=>D nd,) -   r4c|j}| |j}|j}|j||j|j t j |jyr6)r_get_formatterr_print_messagerz_sysstdoutr)r+rNrOrPrrrks r2rQz_VersionAction.__call__s[,, ?nnG))+ 7#i335t{{C r4r6rrgs@r2rr|s!  r4rcReZdZGddeZedddffd ZdZdZd dZ xZ S) _SubParsersActionceZdZfdZxZS)&_SubParsersAction._ChoicesPseudoActionc|x}}|r|ddj|zz }ttj|}|j g|||y)Nrr!)rrrr)r*r_r_ChoicesPseudoActionr`)r+r0aliasesrrrsuprbs r2r`z/_SubParsersAction._ChoicesPseudoAction.__init__sU! !Gd7TYYw%777)>>EC LLD!(  *r4rzrgs@r2rrs  * *r4rFNc ||_||_i|_g|_tt |||t|j|||y)N)rrrrrrr) _prog_prefix _parser_class_name_parser_map_choices_actionsr_rr`r) r+rr\ parser_classrrrrrbs r2r`z_SubParsersAction.__init__sU!) " " /))) 0 r4c |jd|jd||d<|jdd}||jvrt |t d|z|D](}||jvst |t d|zd|vr?|jd}|j |||}|jj||jdi|}||j|<|D]}||j|<|S)Nr\rrr<zconflicting subparser: %szconflicting subparser alias: %sr) rrrrrrsrrr&r)r+r0kwargsraliasr choice_actionrNs r2 add_parserz_SubParsersAction.add_parsers ::f  %(,(9(94@F6N**Y+ 4(( (a(C&Dt&KL LE---#!=>FHH V ::f%D 55dGTJM  ! ! ( ( 7$##-f-&,d#E+1D ! !% ( r4c|jSr6)rr:s r2rz!_SubParsersAction._get_subactionss$$$r4c|d}|dd}|jturt||j| |j|}|j|d\} }t| jD]\} } t|| | |r?t|jtgt|tj|yy#t$r9|dj |jd}t d|z}t||wxYw)Nrrcr!) parser_namerz5unknown parser %(parser_name)r (choices: %(choices)s))rrrdrKeyErrorr*rsrparse_known_argsrr9 setdefault_UNRECOGNIZED_ARGS_ATTRrFr) r+rNrOrPrrr-rvmsg subnamespacekeyr1s r2rQz_SubParsersAction.__call__s Qi QRj  99H $ Ityy+ 6 +**;7F%+$;$;K$N! k|,224JC IsE *5  O & &'> C I6 7 > >{ K # +#.#yy)>)>?ADKLtSCc* *  +s C AD r6) r$r=r>r rrr`rrrQrfrgs@r2rrs2*v*.<%Lr4rceZdZddZy) _ExtendActionNct||jd}t|}|j|t ||j|yr6)rFrrCrrdrs r2rQz_ExtendAction.__call__rr4r6)r$r=r>rQr<r4r2rrs-r4rc$eZdZdZddZdZdZy)raFactory 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. Nc<||_||_||_||_yr6)_mode_bufsize _encoding_errors)r+modebufsizeencodingerrorss r2r`zFileType.__init__s  ! r4cF|dk(rdjvr8djvrtjjStjSt fddDr8djvrtj jStj St djz}t| t|jjjjS#t$r#}||d}t d}t||zd}~wwxYw) N-rbc3:K|]}|jvywr6)r)r%r r+s r2r&z$FileType.__call__..#s4eQ$**_eswaxzargument "-" with mode %r)filenameerrorz$can't open '%(filename)s': %(error)s)rrstdinbufferanyrrsrrrrrOSErrorr)r+stringrervr<s` r2rQzFileType.__call__s S=djj ,/4::,=tzz((M4::M4e44-0DJJ->t{{))ODKKO34tzzA o% 4 DMM4>> & & 4 &3D>?G#GdN3 3 4s=6C44 D =DD c L|j|jf}d|jfd|jfg}dj |Dcgc]}|dk7s t |c}|Dcgc]\}}||d|c}}z}t |jd|dScc}wcc}}w)Nrrr!rrr r")rrrrr*r'r#r$)r+rvrr/kwargs_strs r2r3zFileType.__repr__2szz4==(t~~.4<<0HI994E4C3"9d3i4EAG2gb#!$*,S1223 :..99F2s B B#B )rrNN)r$r=r>r?r`rQr3r<r4r2rrs  4(:r4rc"eZdZdZdZdZdZy)r zSimple object for storing attributes. Implements equality by attribute names and values, and provides a simple string representation. c 2|D]}t||||yr6)rd)r+rr0s r2r`zNamespace.__init__EsD D$t -r4c\t|tstSt|t|k(Sr6)rr NotImplementedr)r+others r2__eq__zNamespace.__eq__Is%%+! !DzT%[((r4c||jvSr6)r8)r+rs r2 __contains__zNamespace.__contains__Nsdmm##r4N)r$r=r>r?r`rrr<r4r2r r >s .) $r4r ceZdZfdZdZddZdZdZdZdZ dZ d Z d Z d Z d Zd ZddZdZdZdZdZxZS)_ActionsContainerc@tt| ||_||_||_||_i|_|jddt|jddt|jddt|jddt|jddt|jddt|jddt|jddt|jdd t |jdd t"|jdd t$|jdd t&|j)g|_i|_g|_g|_i|_t5j6d |_g|_y)Nrstore store_const store_true store_falser& append_constrrrparsersrz^-\d+$|^-\d*\.\d+$)r_rr` descriptionargument_default prefix_charsconflict_handler _registriesregisterrirprvr|rrrrrrr _get_handler_actions_option_string_actions_action_groups_mutually_exclusive_groups _defaultsrWrX_negative_number_matcher_has_negative_number_optionals)r+rrrrrbs r2r`z_ActionsContainer.__init__Ts\ /1& 0( 0 hl3 h6 h /@A h .>? h /@A h-8 h0BC h6 h 4 h >: h +<= h-8  &(#!*,'), 4I(J%/1+r4cF|jj|i}|||<yr6)rr)r+ registry_namer1r!registrys r2rz_ActionsContainer.registers###..}bA r4c@|j|j||Sr6)rr)r+rr1rs r2 _registry_getz_ActionsContainer._registry_gets  .225'BBr4c |jj||jD]%}|j|vs||j|_'yr6)rupdaterrr)r+rrs r2 set_defaultsz_ActionsContainer.set_defaultss@ f%mmF{{f$!' !4$r4c|jD],}|j|k(s|j |jcS|jj |dSr6)rrrrr)r+rrs r2 get_defaultz_ActionsContainer.get_defaultsHmmF{{d"v~~'A~~%$~~!!$--r4c|j}|rt|dk(r.|dd|vr$|rd|vr td|j|i|}n|j|i|}d|vrA|d}||j vr|j ||d<n|j |j |d<|j|}t|std|d|di|}|jd |j|j}t|st|d |turt|d t|d r! |jj|d|j!|S#t$r td wxYw)z add_argument(dest, ..., name=value, ...) add_argument(option_string, option_string, ..., name=value, ...) rcrrz+dest supplied twice for positional argumentrNzunknown action ""r#z is not callablez: is a FileType class object, instance of it must be passedrz,length of metavar tuple does not match nargsr<)rrr_get_positional_kwargs_get_optional_kwargsrr_pop_action_classcallablerr#rr rrr _add_action)r+rvrcharsr action_classr type_funcs r2rz_ActionsContainer.add_arguments!!s4yA~$q'!*E*A&( !NOO0T00$A&AF/T..??F F "&>Dt~~%$(NN4$8y!&&2$($9$9y!--f5  %lDE E''&&vv{{FKKH  "Y@A A  2;>? ? 4) * Q##%2264@'' Q !OPP Qs 8 E))E>cZt|g|i|}|jj||Sr6)_ArgumentGrouprr&)r+rvrrs r2add_argument_groupz$_ActionsContainer.add_argument_groups/t5d5f5 ""5) r4c Tt|fi|}|jj||Sr6)_MutuallyExclusiveGrouprr&)r+rrs r2add_mutually_exclusive_groupz._ActionsContainer.add_mutually_exclusive_groups*'77 ''..u5 r4cV|j||jj|||_|jD]}||j |<|jD]F}|j j|s|jr,|jjdH|S)NT) _check_conflictrr& containerrrrmatchr)r+rrs r2rz_ActionsContainer._add_actions V$ V$$22M9?D ' ' 63$22M,,22=A::77>>tD3  r4c:|jj|yr6)rrYrs r2_remove_actionz _ActionsContainer._remove_actions V$r4ci}|jD]B}|j|vr#td}t||jz|||j<Di}|jD]r}|j|vr?|j |j|j |j ||j<|jD]}||j||<t|jD]4}|j|j}|jD]}|||< 6|jD]#}|j||j|%y)Nz.cannot merge actions - two groups are named %r)titlerr)r)rrrsrrrrrrrrrrr)r+rtitle_group_maprr group_mapr mutex_groups r2_add_container_actionsz(_ActionsContainer._add_container_actionssG((E{{o-HI  !455+0OEKK ( ) --E{{/1/3/F/F++ % 1 1%*%;%;0G0= ,  ..$3EKK$@ &!/."99E;;<)K ..$/ &!/ : ((F MM&$ ' 3 3F ;)r4c d|vrtd}t||jdttfvrd|d<|jdtk(r d|vrd|d<t ||gS)Nrz1'required' is an invalid argument for positionalsrTrrr)rsrrrrrt)r+rrrs r2rz(_ActionsContainer._get_positional_kwargs#st  GHCC.  ::g x&> >!%F:  ::g , .9F3J!%F: Fb99r4cg}g}|D]~}|d|jvr(||jd}td}t||z|j|t |dkDs\|d|jvsn|j||j dd}|U|r|d}n|d}|j |j}|std}t|z|jdd}t||| S) Nr)optionrzNinvalid option string %(option)r: must start with a character %(prefix_chars)rrcrz%dest= is required for options like %rrrsr) rrsrr&rrlstripreplacert) r+rvrrlong_option_stringsrrrdest_option_strings r2rz&_ActionsContainer._get_optional_kwargs3s !M #t'8'88"/(,(9(9;GH t,,  ! !- 0=!A%-*:d>O>O*O#**=9"zz&$' <"%8%;"%3A%6"%,,T->->?D?@ }!455<<S)DFnEEr4cL|jd|}|jd||S)Nr)rr)r+rrrs r2rz#_ActionsContainer._pop_action_classUs'Hg.!!(FF;;r4cd|jz} t||S#t$r$td}t ||jzwxYw)Nz_handle_conflict_%sz%invalid conflict_resolution value: %r)rrFrrsr)r+handler_func_namers r2rz_ActionsContainer._get_handlerYsV1D4I4II :4!23 3 :;FGo$=>>%=s A c|D]d\}}|jj||jj|d|jrJ|jj |fyr6)rrYrrrr)r+rr-rs r2_handle_conflict_resolvez*_ActionsContainer._handle_conflict_resolveys^&9 !M6  ! ! ( ( 7  ' ' + +M4 @((  //7&9r4r6)r$r=r>r`rrrrrrrrrrrrrrrr/r1rfrgs@r2rrRsc01j!C 5.1(f  *%&eZdZdfd ZfdZfdZfdZxZS)r c |j}|d|j|d|j|d|jtt |}|dd|i|||_g|_|j|_ |j|_ |j|_ |j|_ |j|_ |j|_y)Nrrrrr<)rrrrr_r r`rrrrrrrr)r+rrrrr super_initrbs r2r`z_ArgumentGroup.__init__s""!9#=#=>~y556!9#=#=>>49 5{5f5  %00!** &/&F&F#",,  4 4 +*3*N*N'r4cdtt| |}|jj ||Sr6)r_r rrr&r+rrbs r2rz_ArgumentGroup._add_actions-~t8@ ""6* r4cbtt| ||jj |yr6)r_r rrrYr6s r2rz_ArgumentGroup._remove_actions& nd26: ""6*r4cZtjdtdt||i|S)Nz&Nesting argument groups is deprecated.rFcategory stacklevel)r]warnDeprecationWarningr_rr+rvrrbs r2rz!_ArgumentGroup.add_argument_groups/ 4' w)4:6::r4NN)r$r=r>r`rrrrfrgs@r2r r sO, +;;r4r c6eZdZdfd ZdZdZfdZxZS)rcHtt| |||_||_yr6)r_rr`r _container)r+rrrbs r2r`z _MutuallyExclusiveGroup.__init__s! %t5i@  #r4c|jrtd}t||jj |}|j j ||S)Nz-mutually exclusive arguments must be optional)rrsrrBrrr&)r+rrs r2rz#_MutuallyExclusiveGroup._add_actionsK ??CDCS/ !,,V4 ""6* r4cp|jj||jj|yr6)rBrrrYrs r2rz&_MutuallyExclusiveGroup._remove_actions( &&v. ""6*r4cZtjdtdt||i|S)Nz0Nesting mutually exclusive groups is deprecated.rFr9)r]r<r=r_rr>s r2rz4_MutuallyExclusiveGroup.add_mutually_exclusive_groups/ >' w3TDVDDr4)F)r$r=r>r`rrrrfrgs@r2rrs$ +EEr4rc eZdZdZddddgedddddddf fd ZdZdZd Zd Z d Z d#d Z d#d Z dZ dZdZdZdZdZdZdZd#dZd#dZdZdZdZdZdZdZd$dZd$dZd$d Zd%d!Z d"Z!xZ"S)&raKObject for parsing command line strings into Python objects. Keyword Arguments: - prog -- The name of the program (default: ``os.path.basename(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 NrrTc tt| }|||| | |0tjj t jd}||_||_ ||_ ||_ ||_ | |_ | |_| |_|j }|t#d|_|t#d|_d|_d}|j+dd|d|vrdn|d}|jr,|j-|dz|d zd zd t.t#d  |D];}|j1| |j2}|j2j5|=y#t6$rYJwxYw) N)rrrrrzpositional argumentsoptionsc|Sr6r<)rs r2identityz)ArgumentParser.__init__..identity sMr4r#rhrFrzshow this help message and exit)rrr)r_rr`_ospathbasenamerargvr\repilogformatter_classfromfile_prefix_charsadd_help allow_abbrev exit_on_errorrrs _positionals _optionals _subparsersrrrrrrr)r+r\rrrPparentsrQrrRrrrSrTrU superinit add_grouprJdefault_prefixrldefaultsrbs r2r`zArgumentParser.__init__sp.$8 k+#3#3 5 <88$$TYYq\2D   .%:"  (*++ %a(>&?@#AiL1  fdH-!$| 3a ==   s"N1$4V$;x89  ; F  ' ' / 0!++%%h/"  s5 E E+*E+cLgd}|Dcgc]}|t||fc}Scc}w)N)r\rrrQrrSrErGs r2r(zArgumentParser._get_kwargs&s/ 9>>wtT*+>>>rIc |jtdtd|jdt |d|vsd|vrNt|j dd}t|j dd}|j |||_n|j|_|jdk|j}|j}|j}|j|j||d|jj|d<|j!|d}|d d gi|}|jj#||S) Nz(cannot have multiple subparser argumentsrrr subcommandsr\rorrr<)rXrrsrr#rrrVrr_get_positional_actionsrrrrzrrr) r+rrrrkrr parsers_classrs r2add_subparserszArgumentParser.add_subparsers4s?    'a(R&ST T .$t*5 f   7fjj-89EFJJ}d;#    %"&"8"8y"I 4#44T9EOIt 95 6 KK +BC D I6 7$! % 3s8$$ %s"E E=E88E=c B !"jjijD]h}|j}t |jD]B\}}j |g}|j |d||j ||dzdDjig}t} t | D]b\}} | dk(r*|jd| D]} |jd5j| } | d} n| |<d} |j| ddj|t t!d !fd ""fd} j"fd }gd }r t}nd }||kr_tDcgc] }||k\r| c}}||k7r||}||kDr|}8|}|vr||}j ||}| |}||kr_||}j |dg}jD]}| vs|j r|jt#|/|j$.take_actions   V $"..v7GHO fnn4(,,V4'7';';FB'GO&*BB >?&6&G +FC+4EFF (Hh.tYG/r4c|}|\}}}}j}g} |j||dzS|||d}j} |dk(r|d| vr|dk7r|s|d| vrtd} t || |z|j|g|f|d} | |dz}j } || vr$| |}|dd}|sdx}}n|ddk(rd}|dd}nd}nj| |z|dz} np|dk(r|dz} |g}|j|||fnNtd} t || |z|dz}|d}|||}||z} || }|j|||fnE|D]\}}}|||| S)Nrcrsrrozignored explicit argument %rr)_match_argumentr&rrsrr) start_index option_tuplerrsep explicit_argmatch_argument action_tuples arg_countr rchar optionals_mapstoprvrselected_patternsr-arg_strings_patternextrasoption_string_indicesr+r~s r2consume_optionalz:ArgumentParser._parse_known_args..consume_optionals,1=L7C 4FM3 "11NM>MM+k":;&?* + .vs ;I !--E!Q)!,E9(B.,q/U":"#$B"CC"/l8J"KK%,,fb--HI,Q/(,|A(> (,(C(C (M9%2=%AF+7+;L#/59 9l!-aC!7&)/;AB/? &("MM$*=>#.?D!#a*Q ,~%,,fdM-JK  >?+FC,4FGG (!OE(;EF(C% .v7H II 9,D&uT2D!((&$ )FGEN0=+mFD-80=Kr4c j}|d}| |}t |D]\}}|||z}||z } || t|d dd|Sr6)_match_arguments_partialzipr) r match_partialselected_pattern arg_countsrrrvr-rrr+r~s r2consume_positionalsz=ArgumentParser._parse_known_args..consume_positionals5s 99M2;<@ &{4DEJ&)j%A! "; i0GHy( FD)&B)Z)9:KN r4rrz(the following arguments are required: %sr!z#one of the arguments %s is requiredrr6)rR_read_args_from_filesrrrrriterr&_parse_optionalr*rrarNrMrrr8rrrr rrFrd _get_valuerrsrr)#r+r-rOrrr mutex_action conflictsarg_string_pattern_partsarg_strings_iter arg_stringrpatternrrrmax_option_string_indexrnext_option_string_indexpositionals_end_indexstrings stop_indexrequired_actionsrrrHrr{rrrrr|r}r~s#``` @@@@@@@@r2roz ArgumentParser._parse_known_argss  % % 144[AK::K'66M#,[-G-G#H<,77 bI   r!23  q1uv!67$I;!##%  ,&'78MAzT!(//4"2J,33C8#3 $33J? '!G/;)!,!G(//8#9(!gg&>?u #&5  H H*S S n224   ( &)*?&@ #&( #44(+2,)2EK'2,)(* $66(;K(H%);6"7K"7K"77%k2JK g&6 +;7K544:)5   k*+./mmF\)??$++,>37 6;;7')V[[*II 6;; $ GI$ a(R&Syy!12'34 444E~~#22F!993,1+?+?=+? & 8 ;.f5+?=ABC'cCHHUO.CDD5&  M,)~=s N$Nc g}|D]}|r|d|jvr|j|( t|ddtjtj 5}g}|j jD])}|j|D]}|j|+|j|}|j|ddd|S#1swY xYw#t$r}tdt|d}~wwxYw)Nrrc)rr)rRr&rrgetfilesystemencodinggetfilesystemencodeerrorsreadr(convert_arg_line_to_argsrrrrr)r+r-new_arg_stringsr args_filearg_liner/rqs r2rz$ArgumentParser._read_args_from_filess%JAd6P6P!P&&z2 8jn'+'A'A'C%)%C%C%EGJS&( (1(8(C(C(EH'+'D'DX'N + 2 23 7(O)F'+&@&@&M '..{;G&,GG8'c#h778s05C*#A/CC*C' #C** D 3DD c|gSr6r<)r+rs r2rz'ArgumentParser.convert_arg_line_to_argss zr4cx|j|}tj||}|xdtdttdt tdi}|j |j}|$tdd|j|jz}t||t|jdS)Nzexpected one argumentzexpected at most one argumentzexpected at least one argumentzexpected %s argumentzexpected %s argumentsrc) _get_nargs_patternrWrrsrrrrrrrr)r+rr nargs_patternr nargs_errorsrs r2rzArgumentParser._match_arguments//7  -)<= =a/0!;<Q?@L ""6<<0C{56%||-/5||< , ,5;;q>""r4c \g}tt|ddD]}|d|}dj|Dcgc]}|j|c}}t j ||}|O|j |jD cgc] } t| c} |S|Scc}wcc} w)Nrrro)rrr*rrWrrr) r+rrrr actions_slicerrrrs r2rz'ArgumentParser._match_arguments_partialss7|Q+A#BQKMgg-:<-:6 $66v>-:<=GIIg':;E  Hvs6{HI , <Is B$ B) c r|sy|d|jvry||jvr|j|}||ddfSt|dk(ry|jd\}}}|r#||jvr|j|}||||fS|j |}t|dkDrIdj |Dcgc] \}}}}| c}}}}}||d}t d} td| |zt|dk(r|\} | S|jj|r |jsyd|vryd|ddfScc}}}}w)Nrrcrr!)r!matchesz4ambiguous option: %(option)s could match %(matches)sr) rrr partition_get_option_tuplesr*rsrrrr) r+rrrrr option_tuplesrHrvrrs r2rzArgumentParser._parse_optionals!} 1 11 44 400!%!)F 6;;7 ' 6;; ? C1iPQ 6;;7 **F#)#4#4FL%+%8%8FN*224I 9(F+1??F(&+FO("<|jdt fvr*|\}|j||}|j|||S|jtk(r!|Dcgc]}|j||}}|S|jtk(r6|Dcgc]}|j||}}|j||d|S|jtk(rt}|S|Dcgc]}|j||}}|D]}|j|||S#t $rYwxYwcc}wcc}wcc}w)NrUrcr)rrrrrYrrrCrrrr _check_valuerrr)r+rr-r1rvs r2rvzArgumentParser._get_values s+$$fi=P)P ""4( v||x7$$ %%6!!&%0P I&,,,">''~~)!!&%0@ 9$8 3  "v||h7G'G%KJOOFJ7E   fe ,, '\\Y &9DEAT__VQ/EE$ \\V #9DEAT__VQ/EE   feAh / \\X %E :EEAT__VQ/EE!!&!, g  BFFFs#HH&H+ H0 H#"H#c|jd|j|j}t|std}t |||z ||}|S#t $r}t |}t ||d}~wttf$rJt|jdt|j}||d}td}t |||zwxYw)Nr#z%r is not callabler$)r#r1z!invalid %(type)s value: %(value)r) rr#rrsrrrrrrFr') r+rrr rrrqr0rvs r2rzArgumentParser._get_value s&&vv{{FKKH  "()Ci8 8 4z*F ! -c(C, ,:& 46;; D4EFD :6D78Cd 3 3  4sA C!A88ACc|jU||jvrF|djtt|jd}t d}t |||zyy)Nr!)r1rz3invalid choice: %(value)r (choose from %(choices)s))rr*rr'rsr)r+rr1rvrs r2rzArgumentParser._check_value s^ >> %%v~~*E"#yyT6>>)BCEDIJCd 3 3 +F %r4c|j}|j|j|j|j|j Sr6)rrrrrrz)r+rks r2rzArgumentParser.format_usage' sB'') DJJ  ;; =$$&&r4c|j}|j|j|j|j|j |j |jD]c}|j|j|j |j |j|j|je|j |j|jSr6)rrrrrrrrrrrrrrPrz)r+rk action_groups r2rzzArgumentParser.format_help- s'')  DJJ  ;; = 4++,!//L  # #L$6$6 7   |77 8  # #L$?$? @  ! ! # 0 4;;'$$&&r4c:|j|jS)Nr)rQr\r:s r2rzArgumentParser._get_formatterD s###33r4ch|tj}|j|j|yr6)rrrrr+files r2 print_usagezArgumentParser.print_usageJ s) <;;D D--/6r4ch|tj}|j|j|yr6)rrrrzrs r2rzArgumentParser.print_helpO s) <;;D D,,.5r4c|r'|xstj} |j|yy#ttf$rYywxYwr6)rstderrwriterr)r+r<rs r2rzArgumentParser._print_messageT sB &4;;D  7# #G,  s +==cr|r |j|tjtj|yr6)rrrr)r+statusr<s r2rzArgumentParser.exit_ s%     5 &r4c|jtj|j|d}|j dt d|zy)zerror(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. )r\r<rFz%(prog)s: error: %(message)s N)rrrr\rrs)r+r<rvs r2rzArgumentParser.errord s= % g6 !Q784?@r4r?r6)rN)#r$r=r>r?rr`r(rcrrgrarmrrorrrrrrrrrrvrrrrzrrrrrrrfrgs@r2rrs,!!.!'+"&")"#=0D ?>* .$LA!F6#, 7,r(T+bH!Z8t24' '.4 7 6  Ar4r)4r? __version____all__osrLrerWsysrr]rrsrrrrrrrrr!rrCrr r rr r8 Exceptionrrr r\rrirprvr|rrrrrrrrr rr rrr<r4r2rs;z  ,*      . v> "HFHVQ-Q!6!M: $} $& ?I?(  \@ \@@h6/F6/r .6 .F22.(")"#-F#-L--6161.&&V8bLbLH-M-1:v1:n$ $(s8s8l ';&';TEnE8aA%'8aAr4