KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/optparse.pyo
m
=5Dc@sdZdZdddddddd	d
ddd
dddgZdZdkZdkZdkZdkZdklZ	dZ
defdYZd
efdYZ
de
fdYZdefdYZdefdYZd	fdYZd
efdYZdefdYZhdee	df<dee	d f<d!ee	d"f<d#ee	d#f<Zd$Zd%Zd&d'fZdfd(YZd)d*Zd)d+Zyee fWn%e!j
od,d-f\ZZ nXye"Wne!j
oe#e$fZ"nXdfd.YZ%dfd/YZ&de&fd0YZ'de&fd1YZ(d2Z)eZ*dS(3soptparse - a powerful, extensible, and easy-to-use option parser.

By Greg Ward <gward@python.net>

Originally distributed as Optik; see http://optik.sourceforge.net/ .

If you have problems with this module, please do not file bugs,
patches, or feature requests with Python; instead, use Optik's
SourceForge project page:
  http://sourceforge.net/projects/optik

For support, use the optik-users@lists.sourceforge.net mailing list
(http://lists.sourceforge.net/lists/listinfo/optik-users).
s1.5a2tOptiont
SUPPRESS_HELPtSUPPRESS_USAGEtValuestOptionContainertOptionGrouptOptionParsert
HelpFormattertIndentedHelpFormattertTitledHelpFormattert
OptParseErrortOptionErrortOptionConflictErrortOptionValueErrortBadOptionErrors"
Copyright (c) 2001-2004 Gregory P. Ward.  All rights reserved.
Copyright (c) 2002-2004 Python Software Foundation.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

  * Neither the name of the author nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
N(sgettextcCsd|iit||fS(Ns<%s at 0x%x: %s>(tselft	__class__t__name__tid(R((t /usr/lib64/python2.4/optparse.pyt_reprJscBstZdZdZRS(NcCs
||_dS(N(tmsgR(RR((Rt__init__UscCs|iS(N(RR(R((Rt__str__Xs(Rt
__module__RR(((RR
Ts	cBs tZdZdZdZRS(s]
    Raised if an Option instance is created with invalid or
    inconsistent arguments.
    cCs||_t||_dS(N(RRtstrtoptiont	option_id(RRR((RRbs	cCs-|iod|i|ifSn|iSdS(Ns
option %s: %s(RRR(R((RRfs
(RRt__doc__RR(((RR\s	cBstZdZRS(sE
    Raised if conflicting options are added to an OptionParser.
    (RRR(((RRlscBstZdZRS(sS
    Raised if an invalid option value is encountered on the command
    line.
    (RRR(((RR
qscBstZdZRS(sO
    Raised if an invalid or ambiguous option is seen on the command-line.
    (RRR(((RRwscBstZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZRS(s
    Abstract base class for formatting option help.  OptionParser
    instances should use one of the HelpFormatter subclasses for
    formatting help; by default IndentedHelpFormatter is used.

    Instance attributes:
      parser : OptionParser
        the controlling OptionParser instance
      indent_increment : int
        the number of columns to indent per nesting level
      max_help_position : int
        the maximum starting column for option help text
      help_position : int
        the calculated starting column for option help text;
        initially the same as the maximum
      width : int
        total number of columns for output (pass None to constructor for
        this value to be taken from the $COLUMNS environment variable)
      level : int
        current indentation level
      current_indent : int
        current indentation level (in columns)
      help_width : int
        number of columns available for option help text (calculated)
      default_tag : str
        text to replace with each option's default value, "%default"
        by default.  Set to false value to disable default value expansion.
      option_strings : { Option : str }
        maps Option instances to the snippet of help text explaining
        the syntax of that option, e.g. "-h, --help" or
        "-fFILE, --file=FILE"
      _short_opt_fmt : str
        format string controlling how short options with values are
        printed in help text.  Must be either "%s%s" ("-fFILE") or
        "%s %s" ("-f FILE"), because those are the two syntaxes that
        Optik supports.
      _long_opt_fmt : str
        similar but for long options; must be either "%s %s" ("--file FILE")
        or "%s=%s" ("--file=FILE").
    tnonecCsd|_||_||_|_|djoGytti	d}Wnt
tfj
o
d}nX|d8}n||_d|_d|_
d|_||_d|_h|_d|_d|_dS(NtCOLUMNSiPiis%defaults%s %ss%s=%s(tNoneRtparsertindent_incrementtmax_help_positiont
help_positiontwidthtinttostenvirontKeyErrort
ValueErrortcurrent_indenttlevelt
help_widthtshort_firsttdefault_tagtoption_stringst_short_opt_fmtt
_long_opt_fmt(RR!R"R$R-((RRs$		
								cCs
||_dS(N(R R(RR ((Rt
set_parserscCs6|djotd|nd|d|_dS(Ntt s/invalid metavar delimiter for short options: %rs%s(R3R4(tdelimR)RR0(RR5((Rtset_short_opt_delimiters
cCs6|djotd|nd|d|_dS(Nt=R4s.invalid metavar delimiter for long options: %rs%s(R7R4(R5R)RR1(RR5((Rtset_long_opt_delimiters
cCs%|i|i7_|id7_dS(Ni(RR*R!R+(R((RtindentscCs%|i|i8_|id8_dS(Ni(RR*R!R+(R((RtdedentscCs
tddS(Nssubclasses must implement(tNotImplementedError(Rtusage((Rtformat_usagescCs
tddS(Nssubclasses must implement(R;(Rtheading((Rtformat_headingscCsL|pdSn|i|i}d|i}ti||d|d|dS(NR3R4tinitial_indenttsubsequent_indents
(tdescriptionRR$R*t
desc_widthR9ttextwraptfill(RRBRCR9((Rtformat_descriptions
	cCs|idjp|io|iSn|iii|i}|t
jp
|djo
|i}n|ii|it
|S(N(RR RR.Rthelptdefaultstgettdestt
default_valuet
NO_DEFAULTtNO_DEFAULT_VALUEtreplaceR(RRRK((Rtexpand_defaults
c
CsDg}|i|}|i|id}t||jo#d|id|f}|i}n d|id||f}d}|i
||io|i|}ti||i}	|i
d|d|	df|ig}|	dD]}|d|id|fq~n#|ddjo|i
dndi|S(	Nis%*s%s
R3s	%*s%-*s  iiis
(tresultRR/RtoptsR#R*t	opt_widthtlentindent_firsttappendRGROt	help_textRDtwrapR,t
help_linestextendt_[1]tlinetjoin(
RRRTRZRRRPRVR[RQRX((Rt
format_options"



@cCs
|id}xI|iD]>}|i|}||i|<t	|t
||i}qW|ix]|iD]R}xI|iD]>}|i|}||i|<t	|t
||i}qWqpW|i|it|d|i|_|i|i|_dS(Nii(RR9tmax_lenR toption_listtopttformat_option_stringststringsR/tmaxRSR*t
option_groupstgroupR:tminR"R#R$R,(RR R`ReR^Rb((Rtstore_option_stringss&


 



$

c	Cs|io|ip
|ii}g}|iD]}||i	||fq4~}g}|iD]}||i
||fqe~}n|i}|i}|io||}n||}di|S(s@Return a comma-separated list of option strings & metavariables.s, N(Rttakes_valuetmetavarRJtupperRZt_short_optstsoptRR0t
short_optst
_long_optstloptR1t	long_optsR-RQR\(	RRRpRoRlRiRZRmRQ((RRa)s
15		

(RRRRMRR2R6R8R9R:R=R?RFROR]RgRa(((RR}s)									
	
	#	cBs5tZdZddeddZdZdZRS(s.Format help with indented section bodies.
    iiicCsti|||||dS(N(RRRR!R"R$R-(RR!R"R$R-((RR@scCstd|S(Ns
usage: %s
(t_R<(RR<((RR=HscCsd|id|fS(Ns%*s%s:
R3(RR*R>(RR>((RR?Ks(RRRRRR=R?(((RR<s	cBs5tZdZddeddZdZdZRS(s1Format help with underlined section headers.
    iicCsti|||||dS(N(RRRR!R"R$R-(RR!R"R$R-((RRSscCsd|itd|fS(Ns%s  %s
tUsage(RR?RqR<(RR<((RR=[scCsd|d|it|fS(Ns%s
%s
s=-(R>RR+RS(RR>((RR?^s(RRRRRR=R?(((RR	Os	R%tintegertlongslong integertfloatsfloating-pointtcomplexcCsZt|i\}}y||SWn2tj
o&ttd|||fnXdS(Nsoption %s: invalid %s value: %r(
t_builtin_cvtRttypetcvttwhattvalueR)R
RqR`(RR`R{RzRy((Rt
check_builtings
cCsV||ijo|Sn;ditt|i}ttd|||fdS(Ns, s.option %s: invalid choice: %r (choose from %s)(	R{RtchoicesR\tmaptreprR
RqR`(RR`R{R}((Rtcheck_choiceostNOtDEFAULTcBsRtZdZddddddddd	d
ddgZd,Zd-Zd.Zd/Zd0Zhde	<de	<de	<de	<de
<ZeZ
dZdZdZdZdZdZd Zd!Zd"Zd#Zd$ZeeeeeeegZ
d%ZeZd&Zd'Zd(Zd)Zd*Z d+Z!RS(1sr
    Instance attributes:
      _short_opts : [string]
      _long_opts : [string]

      action : string
      type : string
      dest : string
      default : any
      nargs : int
      const : any
      choices : [string]
      callback : function
      callback_args : (any*)
      callback_kwargs : { string : any }
      help : string
      metavar : string
    tactionRxRJtdefaulttnargstconstR}tcallbackt
callback_argstcallback_kwargsRGRitstoretstore_constt
store_truetstore_falseRUtcounttversiontstringR%RtRuRvtchoicecOs]g|_g|_|i|}|i||i|x|iD]}||qEWdS(N(
RRkRnt_check_opt_stringsRQt_set_opt_stringst
_set_attrstattrst
CHECK_METHODStchecker(RRQRR((RRs		


cCs*td|}|ptdn|S(Ns+at least one option string must be supplied(tfilterRRQt	TypeError(RRQ((RRscCsx|D]}t|djotd||qt|djoM|ddjo|ddjptd||n|ii|q|dd!djo|ddjptd||n|ii|qWdS(	Nis>invalid option string %r: must be at least two characters longit-isMinvalid short option string %r: must be of the form -x, (x any non-dash char)s--sGinvalid long option string %r: must start with --, followed by non-dash(RQR`RSRRRkRURn(RRQR`((RRs

"

%

cCsxq|iD]f}|i|ot||||||=q
|djot||tq
t||dq
W|o&tddi	|i
|ndS(NRsinvalid keyword arguments: %ss, (RtATTRStattrRthas_keytsetattrRLRRR\tkeys(RRR((RRs

cCsN|idjo
d|_n.|i|ijotd|i|ndS(NRsinvalid action: %r(RRRtACTIONSR(R((Rt
_check_action-s
cCs|idjoA|i|ijo*|idj	o
d|_qMd|_qnt|itjo|ii|_n|idjo
d|_n|i|ijotd|i|n|i|i	jotd|i|ndS(NRRRsinvalid option type: %rs$must not supply a type for action %r(
RRxRRtALWAYS_TYPED_ACTIONSR}RtTYPESRt
TYPED_ACTIONS(R((Rt_check_type3s

cCs|idjo||idjotd|qt|ititifjo3tdtt|ii	dd|qn+|idj	otd|i|ndS(NRs/must supply a list of choices for type 'choice's1choices must be a list of strings ('%s' supplied)t'is#must not supply choices for type %r(
RRxR}RRttypest	TupleTypetListTypeRtsplit(R((Rt
_check_choiceIs"&cCs|i|ijp
|idj	}|idjoM|oF|io$|iddidd|_q|i	dd|_ndS(NiiRRqi(
RRt
STORE_ACTIONSRxRRhRJRnRNRk(RRh((Rt_check_destVs
"
$cCs>|idjo*|idj	otd|i|ndS(NRs*'const' must not be supplied for action %r(RRRRR(R((Rt_check_constes 
cCsb|i|ijo!|idjo
d|_q^n+|idj	otd|i|ndS(Nis*'nargs' must not be supplied for action %r(RRRRRR(R((Rt_check_nargsks
cCs8|idjot|iptd|i|n|idj	o3t|iti	j	otd|i|n|i
dj	o3t|i
tij	otd|i
|q4nq|idj	otd|i|n|idj	otd|n|i
dj	otd|ndS(NRscallback not callable: %rs3callback_args, if supplied, must be a tuple: not %rs4callback_kwargs, if supplied, must be a dict: not %rs.callback supplied (%r) for non-callback options.callback_args supplied for non-callback options0callback_kwargs supplied for non-callback option(RRtcallableRRRRRxRRRtDictType(R((Rt_check_callbackts )

)


cCsdi|i|iS(Nt/(R\RRkRn(R((RRscCs
|idj	S(N(RRxR(R((RRhscCs(|io|idSn|idSdS(Ni(RRnRk(R((Rtget_opt_strings
cCs>|ii|i}|djo|Sn||||SdS(N(RtTYPE_CHECKERRIRxRRR{R`(RR`R{R((Rtcheck_values
cCsj|dj	oY|idjo|i||Sqftg}|D]}||i||q?~SndS(Ni(	R{RRRRR`ttupleRZtv(RR`R{RZR((Rt
convert_values
cCs4|i||}|i|i|i||||S(N(	RRR`R{ttake_actionRRJtvaluesR (RR`R{RR ((Rtprocesssc	Cs|djot|||ni|djot|||inE|djot||tn$|djot||tn|djo|i	|gi
|n|djo$t|||i	|ddn|d	jo@|ipf}|i
ph}|i||||||n[|d
jo|i|in6|djo|i|intd|idS(
NRRRRRURiiRRGRsunknown action %r(RRRRJR{RRtTruetFalsetensure_valueRURtargsRtkwargsRR`R t
print_helptexitt
print_versiontRuntimeError(	RRRJR`R{RR RR((RRs0





$
 



(	sstoresstore_consts
store_truesstore_falsesappendscountscallbackshelpsversion(sstoresstore_consts
store_truesstore_falsesappendscount(sstoresappendscallback(sstoresappend(sstringsintslongsfloatscomplexschoice("RRRRRRRRRR|RRRRRRRRRRRRRRRRRt__repr__RhRRRRR(((RR}s:*
	3								
												tSUPPRESStHELPtUSAGEiicBsqtZddZdZeZdZdZdZ	dZ
dZdd	Zdd
Z
dZRS(NcCs<|o1x.|iD]\}}t|||qWndS(N(RHtitemsRtvalRR(RRHRR((RRs
cCs
t|iS(N(RRt__dict__(R((RRscCsMt|to|i|ijSn&t|to|i|jSntSdS(N(t
isinstancetotherRRRtdictR(RR((Rt__eq__s
cCs||jS(N(RR(RR((Rt__ne__scCsZxSt|D]E}|i|o/||}|dj	ot|||qRq
q
WdS(s
        Update the option values from an arbitrary dictionary, but only
        use keys from dict that already have a corresponding attribute
        in self.  Any keys in dict without a corresponding attribute
        are silently ignored.
        N(tdirRRRRtdvalRR(RRRR((Rt_update_careful
s


cCs|ii|dS(s
        Update the option values from an arbitrary dictionary,
        using all keys from the dictionary regardless of whether
        they have a corresponding attribute in self or not.
        N(RRtupdateR(RR((Rt
_update_loosescCsM|djo|i|n,|djo|i|ntd|dS(Ntcarefultloosesinvalid update mode: %r(tmodeRRRRR)(RRR((Rt_updates


RcCs1t|ti|}|it||dS(N(	t
__import__tmodnametsystmodulestmodRRtvarsR(RRRR((Rtread_module's

cCs'h}t|||i||dS(N(RtexecfiletfilenameRRR(RRRR((Rt	read_file,s
cCsHt||pt||djot|||nt||S(N(thasattrRRtgetattrRRR{(RRR{((RR1s'(RRRRRRRRRRRRRRR(((RRs				
		cBstZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZRS(s
    Abstract base class.

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

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

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

    cCs1|i||_|i||i|dS(N(Rt_create_option_listtoption_classtset_conflict_handlertconflict_handlertset_descriptionRB(RRRRB((RRWs
	
cCsh|_h|_h|_dS(N(Rt
_short_optt	_long_optRH(R((Rt_create_option_mappingsbs		cCs(|i|_|i|_|i|_dS(N(R RRRRH(RR ((Rt_share_option_mappingskscCs+|djotd|n||_dS(Nterrortresolves$invalid conflict_resolution value %r(serrorR(thandlerR)RR(RR((RRrs
cCs
||_dS(N(RBR(RRB((RRwscCs|iS(N(RRB(R((Rtget_descriptionzscCsg}xB|iD]7}|ii|o|i||i|fqqWxB|iD]7}|i	i|o|i||i	|fqUqUW|o|i
}|djo?tddi
g}|D]}||dq~|q|djox|D]\}}|ido|ii||i	|=n|ii||i|=|ip|ip|iii|qqWqndS(NRs conflicting option string(s): %ss, iRs--(t
conflict_optsRRkR`RRRRURnRRRRR\RZtcotc_optiont
startswithtremovet	containerR_(RRR`RRZRRR((Rt_check_conflicts0
"
"	
2


cOsTt|dtijo|i||}nTt|djo7|o/|d}t	|t
ptd|qn
td|i||i
i|||_x|iD]}||i|<qWx|iD]}||i|<qW|idj	oU|itj	o|i|i|i<qP|ii|ipd|i|i<qPn|S(sOadd_option(Option)
           add_option(opt_str, ..., kwarg=val, ...)
        iisnot an Option instance: %rsinvalid argumentsN(RxRRt
StringTypeRRRRRSRRRRR_RURRkR`RRnRRJRRRLRHR(RRRR`R((Rt
add_options.
	
	

cCs"x|D]}|i|qWdS(N(R_RRR(RR_R((Rtadd_optionsscCs#|ii|p|ii|S(N(RRRItopt_strR(RR((Rt
get_optionscCs#|ii|p|ii|S(N(RRRRR(RR((Rt
has_optionscCs|ii|}|djo|ii|}n|djotd|nx|iD]}|i|=q`Wx|i
D]}|i|=q~W|iii
|dS(Nsno such option %r(RRRIRRRRR)RkR`RnRR_R(RRR`R((Rt
remove_options



cCsc|ipdSng}x;|iD]0}|itj	o|i|i|q"q"Wdi	|S(NR3(
RR_RPRRGRRUt	formatterR]R\(RRRPR((Rtformat_option_helps

cCs|i|iS(N(RRFRR(RR((RRFscCs[g}|io|i|i|n|io|i|i|ndi|S(Ns
(	RPRRBRURFRR_RR\(RRRP((Rtformat_helps

(RRRRRRRRRRRRRRRRRFR(((RR7s 																cBs/tZddZdZdZdZRS(NcCs2||_ti||i|i|||_dS(N(R RRRRRRBttitle(RR RRB((RRs	cCsg|_|i|idS(N(RR_RR (R((RRs	cCs
||_dS(N(RR(RR((Rt	set_titlescCs@|i|i}|i|ti||7}|i|S(N(	RR?RRRPR9RRR:(RRRP((RRs


(RRRRRRR(((RRs		c
BstZdZgZeeeedeeeed	ZdZdZ	dZ
edZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZdZeedZdZdZdZdZdZdZdZdZ dedZ!dZ"dZ#ed Z$d!Z%ed"Z&ed#Z'ed$Z(ed%Z)RS(&s

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

    Instance attributes:
      usage : string
        a usage string for your program.  Before it is displayed
        to the user, "%prog" will be expanded to the name of
        your program (self.prog or os.path.basename(sys.argv[0])).
      prog : string
        the name of the current program (to override
        os.path.basename(sys.argv[0])).

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

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

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

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

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

    Rc

Csti|||||i||	|_||_	t
|_t
|_|djo
t}n||_
|i
i||i|d||idS(Ntadd_help(RRRRRRBt	set_usageR<tprogRRtallow_interspersed_argstprocess_default_valuesRRRR2t_populate_option_listR_tadd_help_optiont_init_parsing_state(
RR<R_RRRRBRR
R	((RRFs

				

		
cCs g|_g|_|idS(N(RR_RdR(R((RRhs		cCs&|idddddtddS(Ns-hs--helpRRGsshow this help message and exit(RRRq(R((Rt_add_help_optionmscCs#|iddddtddS(Ns	--versionRRRGs&show program's version number and exit(RRRq(R((Rt_add_version_optionrs	cCsg|io|i|in|o|i|n|io|in|o|indS(N(Rtstandard_option_listRR_RRRR(RR_R((RRws

cCsd|_d|_d|_dS(N(RRtrargstlargsR(R((RRs		cCsl|djotd|_nI|tjo
d|_n/|iddo|d|_n
||_dS(Ns%prog [options]susage:R4i(R<RRqRRR(RR<((RRs


cCs
t|_dS(N(RRR
(R((Rtenable_interspersed_argsscCs
t|_dS(N(RRR
(R((Rtdisable_interspersed_argsscCs
||_dS(N(RRR(RR((Rtset_process_default_valuesscCs||i|<dS(N(R{RRHRJ(RRJR{((Rtset_defaultscKs|ii|dS(N(RRHRR(RR((Rtset_defaultsscCs2|i}x!|iD]}|i|iqW|S(N(RR_toptionsRdReRY(RReR((Rt_get_all_optionss


cCs|ipt|iSn|ii}x_|iD]Q}|i|i}t
|to)|i}|i||||i<q7q7Wt|S(N(RRRRHtcopyRRRIRJRRt
basestringRRR(RRRRRH((Rtget_default_valuess

!cOst|dtijot|||}nqt|djoT|oL|d}t	|tpt
d|n|i|j	o
tdqn
t
d|i
i||S(Niisnot an OptionGroup instance: %rs"invalid OptionGroup (wrong parser)sinvalid arguments(RxRRRRRRReRSRRR R)RdRU(RRRRe((Rtadd_option_groups
	cCsK|ii|p|ii|}|o|i|j	o|iSndS(N(RRRIRRRRR(RRR((Rtget_option_groups%cCs%|djotidSn|SdS(Ni(RRRtargv(RR((Rt	_get_argss
cCs|i|}|djo|i}n||_g|_}||_y|i|||}Wn+t
tfj
o}|i
|inX||}|i||S(sS
        parse_args(args : [string] = sys.argv[1:],
                   values : Values = None)
        -> (values : Values, args : [string])

        Parse the command-line options found in 'args' (default:
        sys.argv[1:]).  Any errors result in a call to 'error()', which
        by default prints the usage message to stderr and calls
        sys.exit() with an error message.  On success returns a pair
        (values, args) where 'values' is an Values instance (with all
        your option values) and 'args' is the list of arguments left
        over after parsing options.
        N(RR!RRRRRRt
_process_argststopRR
terrRRtcheck_values(RRRR$RR#R((Rt
parse_argss

	
	
cCs
||fS(s
        check_values(values : Values, args : [string])
        -> (values : Values, args : [string])

        Check that the supplied option values and leftover arguments are
        valid.  Returns the option values and leftover arguments
        (possibly adjusted, possibly completely new -- whatever you
        like).  Default implementation just returns the passed-in
        values; subclasses may override as desired.
        N(RR(RRR((RR%s
cCsx|o|d}|djo|d=dSq|dd!djo|i||q|d djo't|djo|i||q|io|i	||d=qdSqWdS(s_process_args(largs : [string],
                         rargs : [string],
                         values : Values)

        Process command-line arguments and populate 'values', consuming
        options and arguments from 'rargs'.  If 'allow_interspersed_args' is
        false, stop at the first non-option argument.  If true, accumulate any
        interspersed non-option arguments in 'largs'.
        is--NiiR(
RtargRt_process_long_optRRSt_process_short_optsR
RRU(RRRRR'((RR"s	

$

cCst||iS(s_match_long_opt(opt : string) -> string

        Determine which long option string 'opt' matches, ie. which one
        it is an unambiguous abbrevation for.  Raises BadOptionError if
        'opt' doesn't unambiguously match any long option string.
        N(t
_match_abbrevR`RR(RR`((Rt_match_long_optBsc
Csk|id}	d|	jo2|	idd\}}|id|t}n
|	}t	}|i|}|i|}|io|i}t||joI|djo|itd|q%|itd||fqQ|djo|id}qQt|d|!}|d|5n)|o|itd|nd}|i||||dS(NiR7is%s option requires an arguments%s option requires %d argumentss%s option does not take a value(RtpopR'RR`tnext_argtinsertRthad_explicit_valueRRR+RRRhRRSRRqR{RRRR(
RRRR`RR-RR/R{R'((RR(Ks.



	
!
cCs|id}
t}d}xf|
dD]Z}d|}|i	i
|}|d7}|p|it
d|n|io|t|
jo|id|
|t}n|i}t||joI|djo|it
d|qT|it
d||fq^|djo|id}	q^t|d|!}	|d|5nd}	|i||	|||oPq&q&WdS(NiiRsno such option: %ss%s option requires an arguments%s option requires %d arguments(RR,R'RR#titchR`RRRIRRRqRhRSR.RRR{RRRR(RRRR`R1RR0RR#R{R'((RR)ps6



	
!
cCs6|idjotiitidSn|iSdS(Ni(RR	RR&tpathtbasenameRR (R((Rt
get_prog_namescCs|id|iS(Ns%prog(tsRNRR4(RR5((Rtexpand_prog_namescCs|i|iS(N(RR6RB(R((RRsicCs,|otii|nti|dS(N(RRtstderrtwriteRtstatus(RR9R((RRscCs4|iti|idd|i|fdS(serror(msg : string)

        Print a usage message incorporating 'msg' to stderr and exit.
        If you override this in a subclass, it should not return -- it
        should either exit or raise an exception.
        is%s: error: %s
N(Rtprint_usageRR7RR4R(RR((RRscCs2|io |ii|i|iSndSdS(NR3(RR<RR=R6(R((Rt	get_usages
 cCs"|io||iIJndS(s`print_usage(file : file = stdout)

        Print the usage message for the current program (self.usage) to
        'file' (default stdout).  Any occurence of the string "%prog" in
        self.usage is replaced with the name of the current program
        (basename of sys.argv[0]).  Does nothing if self.usage is empty
        or not defined.
        N(RR<tfileR;(RR<((RR:s
cCs&|io|i|iSndSdS(NR3(RRR6(R((Rtget_versions
cCs"|io||iIJndS(sDprint_version(file : file = stdout)

        Print the version message for this program (self.version) to
        'file' (default stdout).  As with print_usage(), any occurence
        of "%prog" in self.version is replaced by the current program's
        name.  Does nothing if self.version is empty or undefined.
        N(RRR<R=(RR<((RRs
cCs|djo
|i}n|i|g}|i|itd|i|i	o*|it
i|||idnx4|iD])}|i|i||idqW|idi|d S(NRs
R3i(RRRRgRPRUR?RqR9R_RRRdReRR:R\(RRReRP((RRs






cCs|djo
|i}ng}|io|i|idn|io|i|i|dn|i|i	|di
|S(Ns
R3(RRRRPR<RUR;RBRFRR\(RRRP((RRs



cCs1|djo
ti}n|i|idS(sprint_help(file : file = stdout)

        Print an extended help message, listing all options and any
        help text provided with them, to 'file' (default stdout).
        N(R<RRtstdoutR8RR(RR<((RRs

(*RRRRRRRRRRRRRRRRRRRRRRRR!R&R%R"R+R(R)R4R6RRRR;R:R=RRRR(((RRsJ=$"			
												
	'	
	3			%	*				
		cCs|i|o|Sng}|iD]!}|i|o||q)q)~}t|djo|dSnG|pt	t
d|n&t	t
d|di|fdS(s_match_abbrev(s : string, wordmap : {string : Option}) -> string

    Return the string key in 'wordmap' for which 's' is an unambiguous
    abbreviation.  If 's' is found to be ambiguous or doesn't match any of
    'words', raise BadOptionError.
    iisno such option: %ssambiguous option: %s (%s?)s, N(twordmapRR5RZRtwordRt
possibilitiesRSRRqR\(R5R?RZR@RA((RR*s;(+Rt__version__t__all__t
__copyright__RR&RRDtgettextRqRt	ExceptionR
RRR
RRRR	R%RtRuRvRwR|RRLRRRRRt	NameErrorRRtunicodeRRRRR*tmake_option(!RR|RwRR
R
RRRCR	RRBRRRRRDRRRRLRRRqRRDRRR*RRIRR&((Rt?sN3 		
	
Z		i

D	

Anon7 - 2021