JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў fxEc@sKdZddlZddlZddlZddlZddlTdZejdeZejdeefZ e j ddZ Gd d d Z d d Zd dejDZddZddZGdddZedkrGdZxKddddfD]7Zedeedjeeeeq WndS(u6distutils.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 iN(u*u[a-zA-Z](?:[a-zA-Z0-9-]*)u^%s$u ^(%s)=!(%s)$u-u_cBs|EeZdZdZdddZddZddZdddd Zd d Z d d Z ddZ ddZ ddZ ddZddddZddZdddZddddZdS(u FancyGetoptuWrapper 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 cCst||_i|_|jr(|jni|_i|_g|_g|_i|_i|_i|_ g|_ dS(N( u option_tableu option_indexu _build_indexualiasunegative_aliasu short_optsu long_optsu short2longu attr_nameu takes_argu option_order(uselfu option_table((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu__init__)s           uFancyGetopt.__init__cCs6|jjx"|jD]}||j|d= 2iu:invalid short option '%s': must a single character or Noneu=u:u>invalid negative alias '%s': aliased option '%s' takes a valueuginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tuEinvalid long option name '%s' (must be letters, numbers, hyphens onlyNiii(u long_optsu short_optsu short2longuclearurepeatu option_tableulenu ValueErroru isinstanceustruDistutilsGetoptErroruNoneuappendu takes_argunegative_aliasugetualiasu longopt_reumatchu get_attr_nameu attr_name(uselfuoptionulongushortuhelpurepeatualias_to((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu_grok_option_tables^     "  !        uFancyGetopt._grok_option_tablec Cs>|dkr"tjdd}n|dkr@t}d }nd }|jdj|j}y"t j |||j \}}Wn4t j k r}zt |WYdd}~XnXxh|D]`\}}t |dkr|ddkr|j|d}n>t |dkr,|dddks2t|dd}|jj|} | rc| }n|j|s|dkstd |jj|} | r| }d}qd}n|j|} |r|jj| dk rt|| dd}nt|| ||jj||fqW|r6||fS|SdS( uParse 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. iNu iiu-u--uuboolean option can't have valueTF(uNoneusysuargvu OptionDummyuTrueuFalseu_grok_option_tableujoinu short_optsugetoptu long_optsuerroruDistutilsArgErrorulenu short2longuAssertionErrorualiasugetu takes_argunegative_aliasu attr_nameurepeatugetattrusetattru option_orderuappend( uselfuargsuobjectucreated_objectu short_optsuoptsumsguoptuvalualiasuattr((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyugetoptsF     "".      uFancyGetopt.getoptcCs)|jdkrtdn|jSdS(uReturns the list of (option, value) tuples processed by the previous run of 'getopt()'. Raises RuntimeError if 'getopt()' hasn't been called yet. u!'getopt()' hasn't been called yetN(u option_orderuNoneu RuntimeError(uself((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyuget_option_ordersuFancyGetopt.get_option_ordercCsd}x||jD]q}|d}|d}t|}|ddkrS|d}n|d k rl|d}n||kr|}qqW|ddd}d}||} d|} |r|g} n dg} x|jD]}|d d \}}} t| | } |ddkr'|dd}n|d krt| rZ| jd ||| dfq| jd ||fnHd ||f}| r| jd ||| dfn| jd|x)| dd D]}| j| |qWqW| S(uGenerate help text (a list of strings, one per suggested line of output) from the option table for this FancyGetopt object. iiu=iiiNu uOption summary:Niu --%-*s %su --%-*s u%s (-%s)u --%-*siii(u option_tableulenuNoneu wrap_textuappend(uselfuheaderumax_optuoptionulongushortulu opt_widthu line_widthu text_widthu big_indentulinesuhelputextu opt_names((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu generate_helpsF             ! uFancyGetopt.generate_helpcCsG|dkrtj}nx(|j|D]}|j|dq(WdS(Nu (uNoneusysustdoutu generate_helpuwrite(uselfuheaderufileuline((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu print_helphs  uFancyGetopt.print_helpN(u__name__u __module__u __qualname__u__doc__uNoneu__init__u _build_indexuset_option_tableu add_optionu has_optionu get_attr_nameu_check_alias_dictu set_aliasesuset_negative_aliasesu_grok_option_tableugetoptuget_option_orderu generate_helpu print_help(u __locals__((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu FancyGetopts (       M= Ou FancyGetoptcCs)t|}|j||j||S(N(u FancyGetoptuset_negative_aliasesugetopt(uoptionsu negative_optuobjectuargsuparser((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu fancy_getoptos  u fancy_getoptcCsi|]}dt|qS(u (uord(u.0u_wschar((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu us u cCs|dkrgSt||kr)|gS|j}|jt}tjd|}dd|D}g}x |r}g}d}xt|rt|d}|||kr|j|d|d=||}q|r|d ddkr|d =nPqW|rd|dkrC|j|dd||d|d|d [string] Split 'text' into multiple lines of no more than 'width' characters each, and return the list of strings that results. u( +|-+)cSsg|]}|r|qS(((u.0uch((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu s uwrap_text..iiu Nuii( uNoneulenu expandtabsu translateuWS_TRANSureusplituappendujoin(utextuwidthuchunksulinesucur_lineucur_lenul((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu wrap_textws:        u wrap_textcCs |jtS(uXConvert a long option name to a valid Python identifier by changing "-" to "_". (u translateu longopt_xlate(uopt((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyutranslate_longoptsutranslate_longoptcBs)|EeZdZdZgddZdS(u OptionDummyu_Dummy class just used as a place to hold command-line option values as instance attributes.cCs%x|D]}t||dqWdS(ukCreate a new OptionDummy instance. The attributes listed in 'options' will be initialized to None.N(usetattruNone(uselfuoptionsuopt((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu__init__s uOptionDummy.__init__N(u__name__u __module__u __qualname__u__doc__u__init__(u __locals__((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu OptionDummysu OptionDummyu__main__uTra-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?"].)i iii(u width: %du (u__doc__usysustringureugetoptudistutils.errorsu longopt_patucompileu longopt_reu neg_alias_reustru maketransu longopt_xlateu FancyGetoptu fancy_getoptu whitespaceuWS_TRANSu wrap_textutranslate_longoptu OptionDummyu__name__utextuwuprintujoin(((u;/opt/alt/python33/lib64/python3.3/distutils/fancy_getopt.pyu s($  S  6