hE SrSSKJr SSKrSSKrSSKrSSKrSSKJr SSK J r SSK J r J r Sr\R"S \S 35r\R"S \S \S 35r\R'SS5r"SS5rSSjr\R.Vs0sH n\"U5S_M snrSrSr"SS5r\S:Xa<SrSH3r\ "S\35 \ "SRC\"\\555 \ "5 M5 ggs snf)a6distutils.fancy_getopt Wrapper around the standard getopt module that provides the following additional features: * short and long options are tied together * options have help strings, so fancy_getopt could potentially create a complete usage summary * options set attributes of a passed-in object ) annotationsN)Sequence)Any)DistutilsArgErrorDistutilsGetoptErrorz[a-zA-Z](?:[a-zA-Z0-9-]*)^$z^(z)=!(z)$-_c\rSrSrSrSSjrSrSrSSjrSr S r S r S r S r S rSSSjjrSrSSjrSSjrSrg) FancyGetopt%aWrapper around the standard 'getopt()' module that provides some handy extra functionality: * short and long options are tied together * options have help strings, and help text can be assembled from them * options set attributes of a passed-in object * boolean options can have "negative aliases" -- eg. if --quiet is the "negative alias" of --verbose, then "--quiet" on the command line sets 'verbose' to false NcXl0UlUR(aUR5 0Ul0Ul/Ul/Ul0Ul0Ul0Ul /Ul gN) option_table option_index _build_indexaliasnegative_alias short_opts long_opts short2long attr_name takes_arg option_orderselfrs D/usr/lib/python3/dist-packages/setuptools/_distutils/fancy_getopt.py__init__FancyGetopt.__init__1sk)        !  cURR5 URHnXRUS'M g)Nr)rclearr)roptions rrFancyGetopt._build_indexYs6 !''F+1  fQi ((r"c0XlUR5 gr)rrrs rset_option_tableFancyGetopt.set_option_table^s( r"cXR;a[SUS35eXU4nURRU5 X@RU'g)Nz$option conflict: already an option '')rrrappend)r long_option short_option help_stringr%s r add_optionFancyGetopt.add_optionbsU ++ +&6{m1E "=F    $ $V ,-3  k *r"cXR;$)z[Return true if the option table for this parser has an option with long name 'long_option'.)rrr-s r has_optionFancyGetopt.has_optionls////r"c,UR[5$)zTranslate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores. translate longopt_xlater3s r get_attr_nameFancyGetopt.get_attr_nameqs$$]33r"c [U[5(deUR5HMup4X0R;a[ SUSUSUS35eX@R;dM:[ SUSUSUS35e g)Nzinvalid z 'z ': option 'z ' not defined': aliased option ') isinstancedictitemsrr)raliaseswhatropts r_check_alias_dictFancyGetopt._check_alias_dictws'4((((!--/JE---*tfBug[}M+++*tfBug-@]S *r"c4URUS5 Xlg)z'Set the aliases for this option parser.rN)rDr)rrs r set_aliasesFancyGetopt.set_aliasess ug. r"c4URUS5 Xlg)zSet the negative aliases for this option parser. 'negative_alias' should be a dictionary mapping option names to option names, both the key and value must already be defined in the option table.znegative aliasN)rDr)rrs rset_negative_aliases FancyGetopt.set_negative_aliasess ~/?@,r"c/Ul/UlURR5 0UlUR GH)n[ U5S:XaUup#nSnO$[ U5S:XaUup#pEO[SU<35e[U[5(a[ U5S:a[SUS35eUb3[U[5(a[ U5S :Xd[S US 35eXPRU'URRU5 US S :Xa!U(aUS-nUSS nSURU'OaURRU5nUb4URU(a[SUSUS35eX RS 'SURU'URRU5nUb2URUURU:wa[SUSUS35e[ R#U5(d[SUS35eUR%U5UR&U'U(dGMURRU5 X RUS'GM, g)zPopulate the various data structures that keep tabs on the option table. Called by 'getopt()' before it can do anything worthwhile. rzinvalid option tuple: zinvalid long option 'z"': must be a string of length >= 2Nrzinvalid short option 'z"': must a single character or None=:Tzinvalid negative alias 'r=z' takes a valueFzinvalid alias 'z%': inconsistent with aliased option 'z/' (one of them takes a value, the other doesn'tzinvalid long option name 'z)' (must be letters, numbers, hyphens only)rrrr$repeatrlen ValueErrorr>strrr,rrgetr longopt_rematchr:r)rr%longshorthelprSalias_tos r_grok_option_tableFancyGetopt._grok_option_tablesx   ''F6{a$*!TV!,2)T6!#9&!DEEdC((CIM*+D61ST] 5#(>(>3u:QR?*,UG3UV!'KK  NN ! !$ 'Bx3!CKEAbz'+t$ ..2248'~~h/26tf=//7jI *.NN2&',t$zz~~d+H#>>$'4>>(+CC.)$0++3*5,,##D))*07>> $(#5#5d#;DNN4 u&&u-,0a)I(r"cUc[RSSnUc [5nSnOSnUR5 SR UR 5n[ R "XUR5upQUGH'upx[U5S:XaUSS:XaURUSnO[U5S:a USSS :XdeUSSnURRU5n U (aU nURU(d6US :XdS 5eURRU5n U (aU nSnOSnUR Un U(a+UR"RU 5b[%X*S5S-n['X*U5 UR(R+Xx45 GM* U(aX4$U$![ Ran[U5eSnAff=f) aParse command-line options in args. Store as attributes on object. If 'args' is None or not supplied, uses 'sys.argv[1:]'. If 'object' is None or not supplied, creates a new OptionDummy object, stores option values there, and returns a tuple (args, object). If 'object' is supplied, it is modified in place and 'getopt()' just returns 'args'; in both cases, the returned 'args' is a modified copy of the passed-in 'args' list, which is left untouched. NrTF rOrr z--zboolean option can't have value)sysargv OptionDummyr^joinrgetoptrerrorrrTrrrWrrrrSgetattrsetattrrr,) rargsobjectcreated_objectroptsmsgrCvalrattrs rrgFancyGetopt.getopts <88AB ]F!N"N !XXdoo.  )tHJDHC3x1}Q3ooc!f-3x!|BQ477!"gJJNN3'E>>#&byC"CCy++//4CCC>>#&Dt{{t,8fA.2 F# &    $ $cZ 05: < KG|| )#C( ( )s#F22G GGcJURc [S5eUR$)zReturns the list of (option, value) tuples processed by the previous run of 'getopt()'. Raises RuntimeError if 'getopt()' hasn't been called yet. z!'getopt()' hasn't been called yet)r RuntimeError)rs rget_option_orderFancyGetopt.get_option_orders(    $BC C$$ $r"cSnURH7nUSnUSn[U5nUSS:XaUS- nUbUS-nXb:dM5UnM9 US-S-S-nSnX- n S U-n U(aU/n OS /n URHnUSS upEn [X5n USS:XaUSSnUc?U (aU RS US U3SU S35 O_U RS US U335 OFUSUS3nU (aU RS US U3SU S35 OU RS US U335 U SSHnU RX-5 M M U $)z|Generate help text (a list of strings, one per suggested line of output) from the option table for this FancyGetopt object. rrrPrQNrONrazOption summary:rMz --?ABx Z-. -(0 r"cUc[RnURU5HnURUS-5 M g)N )rcstdoutrwrite)rr}filelines r print_helpFancyGetopt.print_helpus5 <::D&&v.D JJtd{ #/r") rrrrrrrrSrrrr)NNrkzSequence[str] | None)__name__ __module__ __qualname____firstlineno____doc__r rr(r0r4r:rDrGrJr^rgrurr__static_attributes__r"rrr%sS &P2 40 4  -N1`;z%L\$r"rc\[U5nURU5 URX25$r)rrJrg)options negative_optrlrkparsers r fancy_getoptr|s)  !F  - == &&r"racUc/$[U5U::aU/$UR5nUR[5n[R "SU5nUVs/sH o3(dM UPM nn/nU(a/nSnU(aR[US5nXg-U::aUR US5 US Xg-nOU(aUSSS:XaUS O U(aMRU(a7US:Xa"UR USSU5 USUSUS'USSS:XaUS UR SRU55 U(aMU$s snf)zwrap_text(text : string, width : int) -> [string] Split 'text' into multiple lines of no more than 'width' characters each, and return the list of strings that results. Nz( +|-+)rrPrarb)rT expandtabsr8WS_TRANSresplitr,rf)rwidthchunkschrcur_linecur_lenrs rr|r|sO  |  4yEv ?? D >>( #D XXj$ 'F! (6RRb6F ( E fQi.C}%q *1I!- Q3 6  f !|q !E 23"1Ief-q ay|s"1I  RWWX&'A &D LK)s  D=&D=c,UR[5$)zPConvert a long option name to a valid Python identifier by changing "-" to "_". r7)rCs rtranslate_longoptrs == ''r"c(\rSrSrSr/4SSjjrSrg)reiz[Dummy class just used as a place to hold command-line option values as instance attributes.c.UHn[XS5 M g)zcCreate a new OptionDummy instance. The attributes listed in 'options' will be initialized to None.N)rj)rrrCs rr OptionDummy.__init__sC Dt $r"rN)rz Sequence[Any])rrrrrr rrr"rreres&13%%r"re__main__zTra-la-la, supercalifragilisticexpialidocious. How *do* you spell that odd word, anyways? (Someone ask Mary -- she'll know [or she'll say, "How should I know?"].)) (zwidth: rr)"r __future__rrgrstringrccollections.abcrtypingrerrorsrr longopt_patcompilerX neg_alias_rerV maketransr9rr whitespaceordrr|rrerrwprintrf)_wschars0rrs# $; + ZZ1[M+ , zzB{m4 }B?@  c3' T$T$n ' .4->-> ?->'CL# -> ?3l(%% z D  sm dii $*+, W @s C6