Jz`f@csSr/SQrSSKrSSKJr "SS\5r\r/4Sjr /4S jr S r S r S r S r\S:Xa$SSKr\"\ "\R$SSSSS/55 gg!\a SrN[f=f)aParser for command line options. This module helps scripts to parse the command line arguments in sys.argv. It supports the same conventions as the Unix getopt() function (including the special meanings of arguments of the form `-' and `--'). Long options similar to those supported by GNU software may be used as well via an optional third argument. This module provides two functions and an exception: getopt() -- Parse command line options gnu_getopt() -- Like getopt(), but allow option and non-option arguments to be intermixed. GetoptError -- exception (class) raised with 'opt' attribute, which is the option involved with the exception. ) GetoptErrorerrorgetopt gnu_getoptN)gettextcsU$N)Zs /usr/lib64/python3.13/getopt.py_r )sQhcs,\rSrSrSrSrSSjrSrSrg)ri+csHXlX l[RXU5 gr)msgopt Exception__init__)selfr r r rZGetoptError.__init__.s4c*r csUR$r)r )rrr __str__ZGetoptError.__str__3s xxr )rr N)r ) __name__Z __module__Z __qualname__Z__firstlineno__rr rrZ__static_attributes__rr r rr+s C C+ r rcs/n[U[5(aU/nO [U5nU(aUSRS5(aUSS:waUSS:Xa USSnX04$USRS5(a[ X0SSSX SS5up0O[ X0SSSXSS5up0U(a$USRS5(a USS:waMX04$)agetopt(args, options[, long_options]) -> opts, args Parses command line options and parameter list. args is the argument list to be parsed, without the leading reference to the running program. Typically, this means "sys.argv[1:]". shortopts is the string of option letters that the script wants to recognize, with options that require an argument followed by a colon (i.e., the same format that Unix getopt() uses). If specified, longopts is a list of strings with the names of the long options which should be supported. The leading '--' characters should not be included in the option name. Options which require an argument should be followed by an equal sign ('='). The return value consists of two elements: the first is a list of (option, value) pairs; the second is the list of program arguments left after the option list was stripped (this is a trailing slice of the first argument). Each option-and-value pair returned has the option as its first element, prefixed with a hyphen (e.g., '-x'), and the option argument as its second element, or an empty string if the option has no argument. The options occur in the list in the same order in which they were found, thus allowing multiple occurrences. Long and short options may be mixed. r---N) isinstancestrlist startswithdo_longs do_shorts)args shortoptslongoptsoptss r rr8s6 D(C  :> 47%%c**tAw#~ 7d?8D  : 7  d # #!$Q XABxHJD$"4aiabJJD 47%%c**tAw#~ :r cs /n/n[U[5(aU/nO [U5nURS5(aUSSnSnO)[R R S5(aSnOSnU(aUSS:Xa X@SS- nX44$USSS S:Xa[X0SS SX SS5up0OUUSSSS :Xa!USS :wa[X0SSSXSS5up0O(U(aX@- nX44$URUS5 USSnU(aMX44$) agetopt(args, options[, long_options]) -> opts, args This function works like getopt(), except that GNU style scanning mode is used by default. This means that option and non-option arguments may be intermixed. The getopt() function stops processing options as soon as a non-option argument is encountered. If the first character of the option string is `+', or if the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a non-option argument is encountered. Z+rNTZPOSIXLY_CORRECTFrrrr) rrrrosZenvironZgetrrappend)rr r!r"Z prog_argsZall_options_first r rrcsP DI(C  :>C  abM   ) * * !  7d? ab !I  ? 72A;$ !$Q XABxHJD$ !WRa[C DGsN"4aiabJJD$ !  ?  a)ABx $" ?r csZURS5nUSUXS-SpQ[X5upaU(a,Uc(U(d[[ S5U-U5eUSUSSp5OUb[[ S5U-U5eUR SU-U=(d S45 X4$![a SnNf=f)N=rzoption --%s requires argumentrz%option --%s must not have an argumentrr )ZindexZ ValueError long_has_argsrr r$)r"rr!rioptarghas_args r rrs) IIcN"1gsQ34yV /LG >!!$C"Ds"JCPP7DHD  !CDsJCPPKKV\r*+ : sB B*)B*csUVs/sHo"RU5(dMUPM nnU(d[[S5U-U5eX;aSU4$US-U;aSU4$[U5S:a[[S5U-U5e[U5S:XdeUSnUR S5nU(aUSSnXT4$s snf) Nzoption --%s not recognizedFr&Trzoption --%s not a unique prefixri)rrr lenZendswith)rr!ZoZ possibilitiesZ unique_matchr*r%r r'r's (>1LL,=Q>M> !89C?EE cz sm #Sy =A!=>DcJJ }  "" " #L##C(G#CR(   %?s B;B;csUS:wakUSUSSp[XB5(a2US:Xa(U(d[[S5U-U5eUSUSSp1USpOSnURSU-U45 US:waMkX4$)Nr rrzoption -%s requires argumentr) short_has_argrr r$)r"Z optstringr rrr)r%r rrs r/"1y}Y  ( (B%a(F&G#&M&)++"&q'484 )2IF S3Y'( r/ :r cs[[U55H-nXUs=:XaS:wdMO MURSUS-5s $ [[ S5U-U5e)NZ:rzoption -%s not recognized)Zranger+rrr )rr r(rr r,r,s] 3y> "2 A, %# % %''QqS1 12 a34s:C @@r Z__main__rza:bzalpha=Zbeta)Z__doc__Z__all__r#rr Z ImportErrorrrrrrrr'rr,rZsysZprintZargvrr r r-sB 8 $ )  '))V,.0d,!* A  z &!"ux&8 9:]sA"" A.-A.