NֱGc@sdZdZdddddddd d d d d dddgZdZddkZddkZddkZddkZdZyddk l Z Wne j odZ nXe Z d e fdYZ d e fdYZdefdYZde fdYZde fdYZdefdYZd fdYZd efdYZd efd YZd!Zd"Zd#Zhee d$fd%<ee d&fd'<ee d(fd)<ee d*fd* 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((s optparse.pyct_reprIs(tgettextcCs|S(N((tmessage((s optparse.pycRVscBseZdZdZRS(cCs ||_dS(N(tmsg(RR((s optparse.pyct__init__\scCs|iS(N(R(R((s optparse.pyct__str___s(Rt __module__RR(((s optparse.pycR [s cBs eZdZdZdZRS(s] Raised if an Option instance is created with invalid or inconsistent arguments. cCs||_t||_dS(N(Rtstrt option_id(RRtoption((s optparse.pycRis cCs-|iod|i|ifSn|iSdS(Ns option %s: %s(RR(R((s optparse.pycRms (RRt__doc__RR(((s optparse.pycR cs cBseZdZRS(sE Raised if conflicting options are added to an OptionParser. (RRR(((s optparse.pycR sscBseZdZRS(sS Raised if an invalid option value is encountered on the command line. (RRR(((s optparse.pycR xscBs eZdZdZdZRS(sB Raised if an invalid option is seen on the command line. cCs ||_dS(N(topt_str(RR((s optparse.pycRscCstd|iS(Nsno such option: %s(t_R(R((s optparse.pycRs(RRRRR(((s optparse.pycR~s tAmbiguousOptionErrorcBs eZdZdZdZRS(sD Raised if an ambiguous option is seen on the command line. cCsti||||_dS(N(RRt possibilities(RRR!((s optparse.pycRscCs#td|idi|ifS(Nsambiguous option: %s (%s?)s, (RRtjoinR!(R((s optparse.pycRs (RRRRR(((s optparse.pycR 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|d8}n||_ d|_ d|_ d|_ ||_d|_h|_d|_d|_dS(NtCOLUMNSiPiis%defaults%s %ss%s=%s(tNonetparsertindent_incrementt help_positiontmax_help_positiontinttostenvirontKeyErrort ValueErrortwidthtcurrent_indenttlevelt help_widtht short_firstt default_tagtoption_stringst_short_opt_fmtt _long_opt_fmt(RR'R)R/R3((s optparse.pycRs$            cCs ||_dS(N(R&(RR&((s optparse.pyct set_parserscCs6|djotd|nd|d|_dS(Ntt s/invalid metavar delimiter for short options: %rs%s(R9R:(R.R6(Rtdelim((s optparse.pyctset_short_opt_delimiters cCs6|djotd|nd|d|_dS(Nt=R:s.invalid metavar delimiter for long options: %rs%s(R=R:(R.R7(RR;((s optparse.pyctset_long_opt_delimiters cCs%|i|i7_|id7_dS(Ni(R0R'R1(R((s optparse.pyctindentscCs?|i|i8_|idjp td|id8_dS(NisIndent decreased below 0.i(R0R'tAssertionErrorR1(R((s optparse.pyctdedentscCs tddS(Nssubclasses must implement(tNotImplementedError(Rtusage((s optparse.pyct format_usagescCs tddS(Nssubclasses must implement(RB(Rtheading((s optparse.pyctformat_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. R:tinitial_indenttsubsequent_indent(R/R0ttextwraptfill(Rttextt text_widthR?((s optparse.pyct _format_texts   cCs$|o|i|dSndSdS(Ns R9(RM(Rt description((s optparse.pyctformat_descriptionscCs(|od|i|dSndSdS(Ns R9(RM(Rtepilog((s optparse.pyct format_epilog scCs|idjp |i o |iSn|iii|i}|tjp |djo |i}n|ii |it |S(N( R&R%R4thelptdefaultstgettdestt NO_DEFAULTtNO_DEFAULT_VALUEtreplaceR(RRt default_value((s optparse.pyctexpand_defaults   c CsDg}|i|}|i|id}t||jo#d|id|f}|i}n d|id||f}d}|i||io|i|}ti||i }|id|d|df|i g}|dD]} |d|id| fq~n#|ddjo|idndi |S( Nis%*s%s R9s %*s%-*s iiis ( R5R(R0tlentappendRRRZRItwrapR2textendR"( RRtresulttoptst opt_widtht indent_firstt help_textt help_linest_[1]tline((s optparse.pyct format_options$     3cCs |id}xI|iD]>}|i|}||i|}|i|}||i|s&        $  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, ( t takes_valuetmetavarRUtuppert _short_optsR6t _long_optsR7R3R"( RRRsRetsoptt short_optst_[2]tloptt long_optsR`((s optparse.pycRiPs *.    (RRRRWRR8R<R>R?RARDRFRMRORQRZRgRqRi(((s optparse.pycRs")           # cBs5eZdZdddddZdZdZRS(s.Format help with indented section bodies. iiicCsti|||||dS(N(RR(RR'R)R/R3((s optparse.pycRgscCstd|S(Ns Usage: %s (R(RRC((s optparse.pycRDoscCsd|id|fS(Ns%*s%s: R9(R0(RRE((s optparse.pycRFrsN(RRRR%RRDRF(((s optparse.pycRcs  cBs5eZdZdddddZdZdZRS(s1Format help with underlined section headers. iicCsti|||||dS(N(RR(RR'R)R/R3((s optparse.pycRzscCsd|itd|fS(Ns%s %s tUsage(RFR(RRC((s optparse.pycRDscCsd|d|it|fS(Ns%s %s s=-(R1R[(RRE((s optparse.pycRFsN(RRRR%RRDRF(((s optparse.pycR vs  cCs|d idjo d}nT|d idjod}|dpd}n"|d djo d}nd}|||S( Nit0xit0bt0iii (tlower(tvalttypetradix((s optparse.pyct _parse_nums  cCs t|tS(N(RR*(R((s optparse.pyct _parse_intscCs t|tS(N(Rtlong(R((s optparse.pyct _parse_longstintegerR*s long integerRsfloating-pointtfloattcomplexcCsZt|i\}}y||SWn2tj o&ttd|||fnXdS(Nsoption %s: invalid %s value: %r(t _builtin_cvtRR.R R(RRntvaluetcvttwhat((s optparse.pyct check_builtins cCsV||ijo|Sn;ditt|i}ttd|||fdS(Ns, s.option %s: invalid choice: %r (choose from %s)(tchoicesR"tmaptreprR R(RRnRR((s optparse.pyct 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(R[R RuR\Rv(RR`Rn((s optparse.pycRFs&" % cCsxq|iD]f}|i|ot||||||=q |djot||tq t||dq W|o6|i}|itddi||ndS(NRsinvalid keyword arguments: %ss, ( tATTRSthas_keytsetattrRVR%tkeystsortR R"(RRtattr((s optparse.pycR[s     cCsN|idjo d|_n.|i|ijotd|i|ndS(NRsinvalid action: %r(RR%tACTIONSR (R((s optparse.pyct _check_actionos 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(NRRiRRsinvalid option type: %rs$must not supply a type for action %r(RR%RtALWAYS_TYPED_ACTIONSRt __builtin__ttypestTypeTypethasattrtgetattrRtTYPESR t TYPED_ACTIONS(RR((s optparse.pyct _check_typeus"  " cCs|idjo||idjotd|qt|ititifjo3tdtt|iidd|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( RRR%R Rt TupleTypetListTypeRtsplit(R((s optparse.pyct _check_choices"1cCs|i|ijp |idj }|idjoM|oF|io$|iddidd|_q|idd|_ndS(NiiRRi(Rt STORE_ACTIONSRR%RURvRXRu(RRr((s optparse.pyct _check_dests  $cCsA|i|ijo*|idj otd|i|ndS(Ns*'const' must not be supplied for action %r(Rt CONST_ACTIONSRR%R (R((s optparse.pyct _check_consts# cCsb|i|ijo!|idjo d|_q^n+|idj otd|i|ndS(Nis*'nargs' must not be supplied for action %r(RRRR%R (R((s optparse.pyct _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 RR%RRRRtDictType(R((s optparse.pyct_check_callbacks0cCsdi|i|iS(Nt/(R"RuRv(R((s optparse.pycRscCs |idj S(N(RR%(R((s optparse.pycRrscCs(|io|idSn |idSdS(Ni(RvRu(R((s optparse.pyctget_opt_strings cCs>|ii|i}|djo|Sn||||SdS(N(t TYPE_CHECKERRTRR%(RRnRR((s optparse.pyct check_values cCsj|dj oY|idjo|i||Sqftg}|D]}||i||q?~SndS(Ni(R%RRttuple(RRnRRetv((s optparse.pyct convert_values cCs4|i||}|i|i|i||||S(N(Rt take_actionRRU(RRnRtvaluesR&((s optparse.pyctprocesssc Cs|djot|||n|djot|||inr|djot||tnQ|djot||tn0|djo|i|gi|n|djo |i|gi|in|djo$t|||i|dd n|d jo@|ipd}|iph}|i||||||n[|d jo|i |i n6|d jo|i |i nt d |i d S(NRRRRR\RRiiRRRRsunknown action %r((RRtTruetFalset ensure_valueR\RRRt print_helptexitt print_versiont RuntimeErrorR( RRRURnRRR&targstkwargs((s optparse.pycRs4        $      ( 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(#RRRRRRRRRRRRRR%RRRRRRRRRRRRRRt__repr__RrRRRRR(((s optparse.pycRs                    tSUPPRESStHELPtUSAGEiicCst|titifS(N(t isinstanceRt StringTypet UnicodeType(tx((s optparse.pyct isbasestring=scCs t|tS(N(Rt basestring(R((s optparse.pycR@scBsheZd dZdZeZdZdZdZ dZ ddZ ddZ d Z RS( cCs<|o1x.|iD]\}}t|||qWndS(N(titemsR(RRSRR((s optparse.pycRFs cCs t|iS(N(Rt__dict__(R((s optparse.pycRKscCsVt|tot|i|iSn,t|tiot|i|SndSdS(Ni(RRtcmpRRR(Rtother((s optparse.pyct__cmp__Ps 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(tdirRR%R(RtdictRtdval((s optparse.pyct_update_carefulXs    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((s optparse.pyct _update_looseescCsM|djo|i|n,|djo|i|ntd|dS(Ntcarefultloosesinvalid update mode: %r(RRR.(RRtmode((s optparse.pyct_updatems   RcCs1t|ti|}|it||dS(N(t __import__tsystmodulesRtvars(RtmodnameRtmod((s optparse.pyct read_moduleus  cCs'h}t|||i||dS(N(texecfileR(RtfilenameRR((s optparse.pyct read_filezs cCsHt|| pt||djot|||nt||S(N(RRR%R(RRR((s optparse.pycRs'N(RRR%RRRRRRRRRRR(((s optparse.pycRDs       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(RRtconflict_handlerRN((s optparse.pycRs   cCsh|_h|_h|_dS(N(t _short_optt _long_optRS(R((s optparse.pyct_create_option_mappingss  cCs(|i|_|i|_|i|_dS(N(RR RS(RR&((s optparse.pyct_share_option_mappingss  cCs+|djotd|n||_dS(Nterrortresolves$invalid conflict_resolution value %r(serrorsresolve(R.R(Rthandler((s optparse.pycRs cCs ||_dS(N(RN(RRN((s optparse.pycRscCs|iS(N(RN(R((s optparse.pyctget_descriptionscCs|`|`|`dS(ssee OptionParser.destroy().N(RR RS(R((s optparse.pyctdestroysc Csg}xB|iD]7}|ii|o|i||i|fqqWxB|iD]7}|ii|o|i||i|fqUqUW|o|i}|djo?tddig}|D]}||dq~|q|djox|D]\}}|i do|ii ||i|=n|ii ||i|=|ip|ip|i i i |qqWqndS(NR s conflicting option string(s): %ss, iR s--( RuRRR\RvR RR R"t startswithtremovet containerRh(RRt conflict_optsRnRRetcotc_option((s optparse.pyct_check_conflicts4 " "  ,    cOsTt|dtijo|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( R;R%R7R-R.Rt _process_argsRR R Rt check_values(RRRR-R.tstopterr((s optparse.pyct parse_argsIs     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((s optparse.pycR=ps 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_optR[t_process_short_optsR%R\(RR.R-Rtarg((s optparse.pycR<}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. (t _match_abbrevR (RRn((s optparse.pyct_match_long_optsc Csk|id}d|jo2|idd\}}|id|t}n |}t}|i|}|i|}|io|i}t ||joI|djo|i t d|q%|i t d||fqQ|djo|id} qQt |d|!} |d|5n)|o|i t d|nd} |i|| ||dS(NiR=is%s option requires an arguments%s option requires %d argumentss%s option does not take a value(tpopRtinsertRRRER RrRR[R RRR%R( RR-RRCRntnext_argthad_explicit_valueRRR((s optparse.pycRAs0       c Cs}|id}t}d}x[|dD]O}d|}|ii|}|d7}|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(RFRRRTRRrR[RGRRR RRR%R( RR-RRCR>titchRnRRR((s optparse.pycRBs8        cCs6|idjotiitidSn|iSdS(Ni(R$R%R+tpathtbasenameRR:(R((s optparse.pyct get_prog_namescCs|id|iS(Ns%prog(RXRN(Rts((s optparse.pyctexpand_prog_namescCs|i|iS(N(RPRN(R((s optparse.pycRsicCs,|otii|nti|dS(N(RtstderrtwriteR(RtstatusR((s optparse.pycRscCs4|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_usageRRQRRN(RR((s optparse.pycR scCs2|io |ii|i|iSndSdS(NR9(RCRRDRP(R((s optparse.pyct get_usage#s  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(RCRU(Rtfile((s optparse.pycRT*s cCs&|io|i|iSndSdS(NR9(RRP(R((s optparse.pyct get_version6s 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(RRW(RRV((s optparse.pycR<s cCs|djo |i}n|i|g}|i|itd|i|io*|iti |||idnx4|i D])}|i|i ||idqW|i di |d S(NtOptionss R9i(R%RRqR\RFRR?RhRRRkRRAR"(RRR_Rp((s optparse.pycRGs       cCs|i|iS(N(RQRP(RR((s optparse.pycRQXscCs|djo |i}ng}|io|i|idn|io|i|i|dn|i|i||i|i|di |S(Ns R9( R%RRCR\RURNRORRQR"(RRR_((s optparse.pycR[s    cCs-t|dd}|pti}n|S(Ntencoding(RR%Rtgetdefaultencoding(RRVRY((s optparse.pyct _get_encodinghscCsL|djo ti}n|i|}|i|ii|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). RXN(R%RtstdoutR[RRRtencode(RRVRY((s optparse.pycRns  N(-RRRR,R%RRRRRR*R+R'R(R#R/R0R1R2R3R5R7R8R9R;R@R=R<RERARBRNRPRRR RURTRWRRRQRR[R(((s optparse.pycR_sb?              ' 3 % *        cCs|i|o|Sng}|iD]!}|i|o ||q)q)~}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. iiN(RRRR[RRR (ROtwordmapRetwordR!((s optparse.pycRD|s$  (-Rt __version__t__all__t __copyright__RR+RRIRRt ImportErrorRt ExceptionR R R R RR RRR RRRRRRRRRVRRRRRt NameErrorRRRRRRRDt make_option(((s optparse.pycss          {   A