,9Mc@sdZdZdddddddd d d d d dddgZdZddkZddkZddkZddkZddkZdZ y ei Wn%e j odZ e e_ nXy di Wne j odZn XdZyddklZWnej odZnXeZd efdYZd efdYZdefdYZdefdYZdefdYZd efd!YZd fd"YZd efd#YZd efd$YZd%Zd&Zd'Zyed(d)Wne j o eZnXye!d(d)Wne j o e!ZnXheed*fd+<eed,fd-<e"ed.fd/<e#ed0fd0YZ1de1fd?YZ2de1fd@YZ3dAZ4e(Z5dS(Bsoptparse - a powerful, extensible, and easy-to-use option parser. By Greg Ward 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.5.3tOptiont SUPPRESS_HELPtSUPPRESS_USAGEtValuestOptionContainert OptionGroupt OptionParsert HelpFormattertIndentedHelpFormattertTitledHelpFormattert OptParseErrort OptionErrortOptionConflictErrortOptionValueErrortBadOptionErrors" Copyright (c) 2001-2006 Gregory P. Ward. All rights reserved. Copyright (c) 2002-2006 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. iNcCsd|iit||fS(Ns<%s at 0x%x: %s>(t __class__t__name__tid(tself((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_reprJscCsdS(N(tNone(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytfake_getdefaultencodingQstcCs|S(N((tstencodingt replacement((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytencode_wrapperXscCs|i||S(N(tencode(RRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR[s(tgettextcCs|S(N((tmessage((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRhscBseZdZdZRS(cCs ||_dS(N(tmsg(RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt__init__nscCs|iS(N(R(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt__str__qs(Rt __module__RR (((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR ms cBs eZdZdZdZRS(s] Raised if an Option instance is created with invalid or inconsistent arguments. cCs||_t||_dS(N(Rtstrt option_id(RRtoption((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR{s cCs-|iod|i|ifSn|iSdS(Ns option %s: %s(R#R(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR s (RR!t__doc__RR (((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR us cBseZdZRS(sE Raised if conflicting options are added to an OptionParser. (RR!R%(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR scBseZdZRS(sS Raised if an invalid option value is encountered on the command line. (RR!R%(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR scBs eZdZdZdZRS(sB Raised if an invalid option is seen on the command line. cCs ||_dS(N(topt_str(RR&((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRscCstd|iS(Nsno such option: %s(t_R&(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR s(RR!R%RR (((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs tAmbiguousOptionErrorcBs eZdZdZdZRS(sD Raised if an ambiguous option is seen on the command line. cCsti||||_dS(N(RRt possibilities(RR&R)((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRscCs&td|iti|idfS(Nsambiguous option: %s (%s?)s, (R'R&tstringtjoinR)(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR s (RR!R%RR (((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR(s cBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZRS(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|_||_||_|_|djoGyttid}Wntt fj o d}nX|d}n||_ d|_ d|_ d|_ ||_d|_h|_d|_d|_dS(NtCOLUMNSiPiis%defaults%s %ss%s=%s(Rtparsertindent_incrementt help_positiontmax_help_positiontinttostenvirontKeyErrort ValueErrortwidthtcurrent_indenttlevelt help_widtht short_firstt default_tagtoption_stringst_short_opt_fmtt _long_opt_fmt(RR/R1R7R;((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs$            cCs ||_dS(N(R.(RR.((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt set_parserscCs6|djotd|nd|d|_dS(NRt s/invalid metavar delimiter for short options: %rs%s(RRA(R6R>(Rtdelim((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytset_short_opt_delimiters cCs6|djotd|nd|d|_dS(Nt=RAs.invalid metavar delimiter for long options: %rs%s(RDRA(R6R?(RRB((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytset_long_opt_delimiters cCs'|i|i|_|id|_dS(Ni(R8R/R9(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytindentscCsA|i|i|_|idjp td|id|_dS(NisIndent decreased below 0.i(R8R/tAssertionErrorR9(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytdedentscCs tddS(Nssubclasses must implement(tNotImplementedError(Rtusage((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt format_usagescCs tddS(Nssubclasses must implement(RI(Rtheading((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytformat_headingscCs9|i|i}d|i}ti||d|d|S(s Format a paragraph of free-form text for inclusion in the help output at the current indentation level. RAtinitial_indenttsubsequent_indent(R7R8ttextwraptfill(Rttextt text_widthRF((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _format_text s   cCs$|o|i|dSndSdS(Ns R(RT(Rt description((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytformat_descriptionscCs(|od|i|dSndSdS(Ns R(RT(Rtepilog((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt format_epilogscCs|idjp |i o |iSn|iii|i}|tjp |djo |i}nt i |i|it |S(N( R.RR<thelptdefaultstgettdestt NO_DEFAULTtNO_DEFAULT_VALUER*treplaceR"(RR$t default_value((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytexpand_default#s   c Cs=g}|i|}|i|id}t||jo#d|id|f}|i}n d|id||f}d}|i||iox|i|}ti||i }|id|d|dfxU|dD]#}|id|id|fqWn#|ddjo|idnt i |dS( Nis%*s%s Rs %*s%-*s iiis ( R=R0R8tlentappendRYRaRPtwrapR:R*R+( RR$tresulttoptst opt_widtht indent_firstt help_textt help_linestline((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt format_option-s&     %cCs |id}xI|iD]>}|i|}||i|}|i|}||i|t _long_optsR?R;R+(RR$Rxt short_optstsoptt long_optstloptRf((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRnbs    "    (RR!R%R^RR@RCRERFRHRKRMRTRVRXRaRlRvRn(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs")           # cBs5eZdZdddddZdZdZRS(s.Format help with indented section bodies. iiicCsti|||||dS(N(RR(RR/R1R7R;((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR{scCstd|S(Ns Usage: %s (R'(RRJ((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRKscCsd|id|fS(Ns%*s%s: R(R8(RRL((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRMsN(RR!R%RRRKRM(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRws  cBs5eZdZdddddZdZdZRS(s1Format help with underlined section headers. iicCsti|||||dS(N(RR(RR/R1R7R;((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRscCsd|itd|fS(Ns%s %s tUsage(RMR'(RRJ((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRKscCsd|d|it|fS(Ns%s %s s=-(R9Rb(RRL((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRMsN(RR!R%RRRKRM(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR s  cCsti|d djo d}nWti|d djod}|dpd}n"|d djo d}nd}|||S( Nit0xit0bt0iii (R*tlower(tvalttypetradix((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _parse_nums  cCs t|tS(N(RR2(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _parse_intscCs t|tS(N(Rtlong(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _parse_longsRi tintegerR2s long integerRsfloating-pointtfloattcomplexcCsZt|i\}}y||SWn2tj o&ttd|||fnXdS(Nsoption %s: invalid %s value: %r(t _builtin_cvtRR6R R'(R$Rstvaluetcvttwhat((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt check_builtins cCsY||ijo|Sn>titt|id}ttd|||fdS(Ns, s.option %s: invalid choice: %r (choose from %s)(tchoicesR*R+tmaptreprR R'(R$RsRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt check_choices  tNOtDEFAULTc BsXeZdZddddddddd d d d g Zd-Zd.Zd/Zd0Zd1Zd2Z he d<e d<e d<e d<e dinvalid 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(RbR RzRcR{(RRfRs((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRfs&" % cCsxq|iD]f}|i|ot||||||=q |djot||tq t||dq W|o9|i}|itdti |d|ndS(NRsinvalid keyword arguments: %ss, ( tATTRSthas_keytsetattrR]RtkeystsortR R*R+(RRtattr((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR{s     cCsN|idjo d|_n.|i|ijotd|i|ndS(NRsinvalid action: %r(RRtACTIONSR (R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _check_actions cCs9|idjoA|i|ijo*|idj o d|_qMd|_q5nddk}t|itijp5t|ido5t ||ii d|ijo|ii |_n|idjo d|_n|i|i jot d|i|n|i|i jot d|i|ndS(NRR*iRR"sinvalid option type: %rs$must not supply a type for action %r(RRRtALWAYS_TYPED_ACTIONSRt __builtin__ttypestTypeTypethasattrtgetattrRtTYPESR t TYPED_ACTIONS(RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _check_types"  " cCs|idjo|idjotd|qt|ititifjo6tdtit t|idd|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( RRRR Rt TupleTypetListTypeR*tsplitR"(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _check_choices"4cCs|i|ijp |idj }|idjoP|oI|io'ti|idddd|_q|idd|_ndS(NiiRR'i( Rt STORE_ACTIONSRRR\R{R*R_Rz(RRw((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _check_dests  'cCsA|i|ijo*|idj otd|i|ndS(Ns*'const' must not be supplied for action %r(Rt CONST_ACTIONSRRR (R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _check_consts# cCsb|i|ijo!|idjo d|_q^n+|idj otd|i|ndS(Nis*'nargs' must not be supplied for action %r(RRRRR (R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _check_nargss cCs8|idjot|iptd|i|n|idj o3t|itij otd|i|n|i dj o3t|i ti j 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( RtcallableRR RRRRRRtDictType(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_check_callbacks0cCsti|i|idS(Nt/(R*R+RzR{(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR scCs |idj S(N(RR(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRw scCs(|io|idSn |idSdS(Ni(R{Rz(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytget_opt_string s cCs>|ii|i}|djo|Sn||||SdS(N(t TYPE_CHECKERR[RR(RRsRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt check_values cCsU|dj oD|idjo|i||SqQtt||d|SndS(NicSs|i||S((R(tvtoR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt"s(RRRttupleR(RRsR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt convert_values cCs4|i||}|i|i|i||||S(N(Rt take_actionRR\(RRsRtvaluesR.((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytprocess$sc Cs|djot|||n|djot|||iny|djot||tnX|djot||tn7|djo|i|gi|n |djo |i|gi|in|djo$t|||i|dd n|d joG|ipd}|iph}t|i ||||f||n[|d jo|i |i n6|d jo|i |i nt d |id S(NRRRRRcRRiiRRYRsunknown action %r((RRtTruetFalset ensure_valueRcRRtapplyRt print_helptexitt print_versiont RuntimeErrorR( RRR\RsRRR.targstkwargs((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR0s4        $ '    ( sstores store_consts store_trues store_falsesappends append_constscountscallbackshelpsversion(sstores store_consts store_trues store_falsesappends append_constscount(sstoresappendscallback(sstoresappend(s store_consts append_const(sstringsintslongsfloatscomplexschoiceN(#RR!R%RRRRRRRRRRRRRRRRRRRRRRRR Rt__repr__RwRRRRR(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs                    tSUPPRESStHELPtUSAGEiicCst|tiS(N(t isinstanceRt StringType(tx((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt isbasestring]scCs#t|tipt|tiS(N(RRRt UnicodeType(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR`scBsheZd dZdZeZdZdZdZ dZ ddZ ddZ d Z RS( cCs<|o1x.|iD]\}}t|||qWndS(N(titemsR(RRZRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRes cCs t|iS(N(R"t__dict__(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR jscCsVt|tot|i|iSn,t|tiot|i|SndSdS(Ni(RRtcmpRRR(Rtother((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt__cmp__os cCsZxSt|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(tdirRRR(RtdictRtdval((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_update_carefulws    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(Rtupdate(RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _update_loosescCsM|djo|i|n,|djo|i|ntd|dS(Ntcarefultloosesinvalid update mode: %r(RRR6(RRtmode((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_updates   RcCs1t|ti|}|it||dS(N(t __import__tsystmodulesRtvars(RtmodnameRtmod((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt read_modules  cBs1h}e|di|U|i||dS(NtrU(topentreadR(RtfilenameRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt read_filescCsHt|| pt||djot|||nt||S(N(RRRR(RRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs'N(RR!RRR RRRRRRRR R(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRcs       cBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZRS(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(t_create_option_listt option_classtset_conflict_handlertset_description(RR tconflict_handlerRU((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs   cCsh|_h|_h|_dS(N(t _short_optt _long_optRZ(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_create_option_mappingss  cCs(|i|_|i|_|i|_dS(N(RRRZ(RR.((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_share_option_mappingss  cCs+|djotd|n||_dS(Nterrortresolves$invalid conflict_resolution value %r(serrorR(R6R(Rthandler((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR s cCs ||_dS(N(RU(RRU((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR scCs|iS(N(RU(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytget_descriptionscCs|`|`|`dS(ssee OptionParser.destroy().N(RRRZ(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytdestroysc Csg}xB|iD]7}|ii|o|i||i|fqqWxB|iD]7}|ii|o|i||i|fqUqUW|o|i}|djo/tdti t d|d|q||djox|D]\}}|d djo|ii ||i|=n|ii ||i|=|ip|ip|i i i |qqWq|ndS(NRs conflicting option string(s): %scSs|dS(i((tco((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRss, Ris--(RzRRRcR{RRR R*R+Rtremovet containerRm(RR$t conflict_optsRsRtc_option((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_check_conflicts4 " "      cOsWt|dtijot|i||}nTt|djo7| o/|d}t|tptd|qn td|i ||i i |||_ x|i D]}||i| (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( RBRR>R3R4Rt _process_argsRR RR"t check_values(RRRR3R4tstopterr((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt parse_argshs     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. ((RRR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRDs 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(t_process_long_optRbt_process_short_optsR+Rc(RR4R3Rtarg((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRCs   $   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. (t _match_abbrevR(RRs((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt_match_long_optsc Csn|id}d|jo5ti|dd\}}|id|t}n |}t}|i|}|i|}|io|i }t ||joI|djo|i t d|q(|i t d||fqT|djo|id} qTt |d|!} |d|5n)|o|i t d|nd} |i|| ||dS(NiRDis%s option requires an arguments%s option requires %d argumentss%s option does not take a value(tpopR*RtinsertRRRLRRwRRbRR'RRR( RR3RRJRstnext_argthad_explicit_valueR$RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRHs0       c Cs}|id}t}d}x[|dD]O}d|}|ii|}|d}|pt|n|io|t|jo|id||t}n|i } t|| joI| djo|i t d|qI|i t d|| fqS| djo|id} qSt |d| !} |d| 5nd} |i|| |||oPq&q&WdS(NiiRs%s option requires an arguments%s option requires %d arguments(RMRRR[RRwRbRNRRRR'RRR( RR3RRJREtitchRsR$RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRIs8        cCs6|idjotiitidSn|iSdS(Ni(R*RR3tpathtbasenameRRA(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt get_prog_name'scCsti|d|iS(Ns%prog(R*R_RU(RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pytexpand_prog_name-scCs|i|iS(N(RVRU(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR0sicCs,|otii|nti|dS(N(RtstderrtwriteR(RtstatusR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR3scCs4|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(t print_usageRRWRRU(RR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR8scCs2|io |ii|i|iSndSdS(NR(RJR#RKRV(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt get_usageBs  cCs)|io|i|idndS(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. s N(RJRXR[(Rtfile((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRZIs cCs&|io|i|iSndSdS(NR(RRV(R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt get_versionUs cCs)|io|i|idndS(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. s N(RRXR](RR\((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR[s cCs|djo |i}n|i|g}|i|itd|i|io*|iti |||idnx4|i D])}|i|i ||idqW|i t i|d dS(NtOptionss iR(RR#RvRcRMR'RFRmRR$RpR%RHR*R+(RR#ReRu((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR$fs       cCs|i|iS(N(RXRW(RR#((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRXwscCs|djo |i}ng}|io|i|idn|io|i|i|dn|i|i||i|i|t i |dS(Ns R( RR#RJRcR[RURVR$RXR*R+(RR#Re((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR%zs    cCs-t|dd}|pti}n|S(NR(RRRtgetdefaultencoding(RR\R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyt _get_encodingscCsL|djo ti}n|i|}|it|i|ddS(sprint_help(file : file = stdout) Print an extended help message, listing all options and any help text provided with them, to 'file' (default stdout). R_N(RRtstdoutR`RXRR%(RR\R((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRs  N(-RR!R%R2RRRRRR R0R1R-R.R)R5R6R7R8R9R<R>R?R@RBRGRDRCRLRHRIRURVRRRR[RZR]RR$RXR%R`R(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyR~sb?              ' 3 % *        cCs|i|o|Snkt|d|i}t|djo |dSn1|pt|n|it||dS(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. cSs|t| |jS((Rb(twR((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRsiiN(RRRRbRRR((RtwordmapR)((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyRKs  (6R%t __version__t__all__t __copyright__R*RR3RRPRR_tAttributeErrorRRRRt ImportErrorR't ExceptionR R R R RR(RRR RRRR2RRRRRRRR]RRRRRt NameErrorRRRRRRRKt make_option(((sAinstall/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyss                 {    A