-
<c       s
    d  Z    d k Z  d d d d d d d d	 d
 d d d d d d d g Z  y  d k TWn  e j
 o " d Z # d Z $ d Z % d Z & d Z	 ' d Z
 ( d Z ) d Z * e Z , d   Z D e d  Z L d   Z R d   Z n X] d   Z  d d   Z  d!   Z  e d"  Z  d#   Z  d$   Z  e Z  d%   Z  d&   Z d'   Z !d( d d d) f d*  Z Te d+  Z  fe d,  Z ve d-  Z! h  d. d/ <d. d0 <d1 d2 <d1 d3 <d1 d4 <d1 d5 <d1 d6 <d1 d7 <d1 d8 <d9 d: <d9 d; <d9 d< <d= d> <d= d? <d= d@ <dA dB <dC dD <dE dF <dG dH <dI dJ <dK dL <dK dM <dK dN <dO dP <dQ dR <dS dT <dS dU <dS dV <dW dX <dW dY <dW dZ <Z" h  d[ d\ <d] d^ <d] d_ <d` da <d] db <dc dd <dc de <dc df <dg dh <d. d0 <d. di <d[ dj <dk dl <dm dn <do dp <dq dr <dq ds <dq dt <du dv <du dw <dx dy <dz d{ <dz d| <dz d} <d~ d <d d <d d <d~ d <d d <d d <d d <d d <d[ d6 <d d <d d <d d <d d <d d <d d <d[ d <d d <d d <d d <d[ d <d[ d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <dg d <d d <d d <d d <d d <d d <d~ d <d~ d <d~ d <d d <d d <do d <do d <d d <d d <d d <d d <d d <d d <d d <d d <d[ d <d d <d[ d <d d <d[ d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d<d d<d d<d d<d d<d d<d d<dd	<dd
<dd<dd<dd<dd<dd<dd<dd<d d<dd<dd<dd<dd<dd<dd<dd<d d!<d"d#<d. d$<d. d%<d d&<d"d'<d d(<d)d*<d)d+<d,d-<d,d.<d)d/<d,d0<d1d2<d1d3<d4d5<d1d6<d1d7<d8d9<d8d:<d;d<<d;d=<d>d?<d8d@<d;dA<dBdC<dBdD<d dE<d dF<dGdH<dIdJ<dIdK<dIdL<dMdN<dOdP<dOdQ<dOdR<dSdT<dSdU<dk dV<dk dW<dm dX<dk dY<dm dZ<dm d[<Z# vh  d\d]<d^d_<d`da<dbdc<ddde<dfdg<dhdi<djdk<dldm<dndo<dpdq<drds<dtdu<dvdw<dxdy<dzd{<d|d}<d~d<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<Z$ d  Z% y e	 Wn n Xe i& d e' dj o4 dGHHe%   HdGHHe   n d S(  s   Locale support.

    The module provides low-level access to the C lib's locale APIs
    and adds high level number formatting APIs as well as a locale
    aliasing engine to complement these.

    The aliasing engine includes support for many commonly used locale
    names and maps them to values suitable for passing to the C lib's
    setlocale() function. It also includes default encodings for all
    supported locale names.

Ns	   setlocales   Errors
   localeconvs   strcolls   strxfrms   formats   strs   atofs   atois   LC_CTYPEs
   LC_COLLATEs   LC_TIMEs   LC_MONETARYs
   LC_NUMERICs   LC_ALLs   CHAR_MAX(   s   *i   i   i   i    i   i   i   i   c      s   , / 1 h  d g d <d d <d d <d d <d d <g  d <d d	 <d
 d <d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <Sd S(   sd    localeconv() -> dict.
            Returns numeric and monetary locale-specific parameters.
        i   s   groupings    s   currency_symbols   n_sign_posns   p_cs_precedess   n_cs_precedess   mon_groupings   n_sep_by_spaces   .s   decimal_points   negative_signs   positive_signs   p_sep_by_spaces   int_curr_symbols   p_sign_posns   thousands_seps   mon_thousands_seps   frac_digitss   mon_decimal_points   int_frac_digitsN(    (    (    (    s   /usr/lib/python2.2/locale.pys
   localeconv, s   c    s>   D G H | t j	 o
 | d j o I t d  n J d Sd S(   sd    setlocale(integer,string=None) -> string.
            Activates/queries locale processing.
        s   Cs*   _locale emulation only supports "C" localeN(   s   values   Nones   Error(   s   categorys   value(    (    s   /usr/lib/python2.2/locale.pys	   setlocaleD s   c    s   L O P t  |  |  Sd S(   sb    strcoll(string,string) -> int.
            Compares two strings according to the locale.
        N(   s   cmps   as   b(   s   as   b(    (    s   /usr/lib/python2.2/locale.pys   strcollL s   c    s   R U V |  Sd S(   sd    strxfrm(string) -> string.
            Returns a string that behaves for cmp locale-aware.
        N(   s   s(   s   s(    (    s   /usr/lib/python2.2/locale.pys   strxfrmR s   c    s  ] ^ t    } _ | d } ` | o ` |  d f Sn a d } b d } c d } d |  d d j o0 e |  i d  } f |  | } g |  |  }  n h x h |  o | o j | d t	 j o k Pn3 m | d d j o o | d } p | d } n q | o+ r |  | | d | } s | d 7} n u |  | } v |  |  }  w |  o |  d d j o y |  | | | f Sn q Wz | o { |  | | f Sn | |  o& } |  | d | } ~ | d 7} n  | | | f Sd  S(	   Ns   groupingi    s    is    i   s   thousands_seps
   0123456789(   s
   localeconvs   convs   groupings   ss   results   sepss   spacess   finds   sps   CHAR_MAXs   group(   s   ss   spacess   groups   results   convs   sepss   sps   grouping(    (    s   /usr/lib/python2.2/locale.pys   _group] s>    			 

c    s6     |  | }  | i d  }  d }  | o!  t | d  \ | d <} n  t |  d j o$  | d t	   d | d } n4  t |  d j o  | d } n  t
 d   x_  | oT  | i d  }  | d j o  Pn  | |  | | d }  | d 8} q W | Sd	 S(
   s   Formats a value in the same way that the % formatting would use,
    but takes the current locale into account.
    Grouping is applied if the third parameter is true.s   .i    i   s   decimal_pointi   s(   Too many decimal points in result strings    iN(   s   fs   vals   results   splits   fieldss   sepss   groupings   _groups   lens
   localeconvs   Errors   finds   sp(   s   fs   vals   groupings   fieldss   sps   results   seps(    (    s   /usr/lib/python2.2/locale.pys   format s&   	
!$ 
 c    s      t  d |   Sd S(   s9   Convert float to integer, taking the locale into account.s   %.12gN(   s   formats   val(   s   val(    (    s   /usr/lib/python2.2/locale.pys   str s   c    s      t    d }  | o(  |  i |  }  d i |  }  n  t    d }  | o(  |  i |  }  d i |  }  n  | |   Sd S(   s<   Parses a string as a float according to the locale settings.s   thousands_seps    s   decimal_points   .N(   s
   localeconvs   tss   strs   splits   ss   joins   dds   func(   s   strs   funcs   ss   dds   ts(    (    s   /usr/lib/python2.2/locale.pys   atof s   

c    s      t  |  t  Sd S(   sA   Converts a string to an integer according to the locale settings.N(   s   atofs   strs   int(   s   str(    (    s   /usr/lib/python2.2/locale.pys   atoi s   c     sg     t  t d   t d d d  }   |  Gd Gt |   GH t d  }   |  Gd Gt |   GHd  S(   Ns    s   %di[i   s   isf3.1400000000000001(   s	   setlocales   LC_ALLs   formats   s1s   atois   strs   atof(   s   s1(    (    s   /usr/lib/python2.2/locale.pys   _test s
   c    s     |  i   }  d | j o  | i d d  } n  d | j o1  | i d  d  \ } }  | d | } n  | }  d }  t i | t	  }  | t	 j	 o  | Sn  t i | t	  }  | t	 j	 o  d | j o  | i d  \ } } n  | }  d }  | o  t i | |  } n
  | }  | o  | d | Sn  | Sn  |  Sd S(   s   Returns a normalized locale code for the given locale
        name.

        The returned locale code is formatted for use with
        setlocale().

        If normalization fails, the original name is returned
        unchanged.

        If the given encoding is not known, the function defaults to
        the default encoding for the locale code just like setlocale()
        does.

    s   :s   .i   s    N(   s
   localenames   lowers   fullnames   replaces   splits   langnames   encodings   locale_aliass   gets   Nones   codes   defencs   encoding_alias(   s
   localenames   codes   langnames   encodings   fullnames   defenc(    (    s   /usr/lib/python2.2/locale.pys	   normalize s2   				
	
c    sr    	
t  |   } d | j o | i d  d  Sn" | d j o t t f Sn t d |   d S(   s   Parses the locale code for localename and returns the
        result as tuple (language code, encoding).

        The localename is normalized and passed through the locale
        alias engine. A ValueError is raised in case the locale name
        cannot be parsed.

        The language code corresponds to RFC 1766.  code and encoding
        can be None in case the values cannot be determined or are
        unknown to this implementation.

    s   .i   s   Cs   unknown locale: %sN(   s	   normalizes
   localenames   codes   splits   Nones
   ValueError(   s
   localenames   code(    (    s   /usr/lib/python2.2/locale.pys   _parse_localename s   c    s`   |  \ } } | t j o d } n | t j o | Sn | d | Sd S(   s    Builds a locale code from the given tuple (language code,
        encoding).

        No aliasing or normalizing takes place.

    s   Cs   .N(   s   localetuples   languages   encodings   None(   s   localetuples   encodings   language(    (    s   /usr/lib/python2.2/locale.pys   _build_localenames   s   LANGUAGEs   LANGc    s  !79y% ;d k  } <| i   \ } } Wn =t t f j
 o
 >nY XAt i d j o | o | d  d j o Ct i	 t
 | d   } n F| | f SId k } J| i i	 } KxD |  DK]0 } L| | t  } M| t j	 o NPn q WPd } Qt |  Sd S(   s   Tries to determine the default locale settings and returns
        them as tuple (language code, encoding).

        According to POSIX, a program which has not called
        setlocale(LC_ALL, "") runs using the portable 'C' locale.
        Calling setlocale(LC_ALL, "") lets it use the default locale as
        defined by the LANG variable. Since we don't want to interfere
        with the current locale setting we thus emulate the behavior
        in the way described above.

        To maintain compatibility with other platforms, not only the
        LANG variable is tested, but a list of variables given as
        envvars parameter. The first found to be defined will be
        used. envvars defaults to the search path used in GNU gettext;
        it must always contain the variable name 'LANG'.

        Except for the code 'C', the language code corresponds to RFC
        1766.  code and encoding can be None in case the values cannot
        be determined.

    Ns   win32i   s   0xi    s   C(   s   _locales   _getdefaultlocales   codes   encodings   ImportErrors   AttributeErrors   syss   platforms   windows_locales   gets   ints   oss   environs   lookups   envvarss   variables   Nones
   localenames   _parse_localename(   s   envvarss   _locales   codes   encodings   lookups   variables
   localenames   os(    (    s   /usr/lib/python2.2/locale.pys   getdefaultlocale!s$   +
 		c    sS   T`at  |   } b|  t j o
 d | j o ct d  n dt |  Sd S(   sp   Returns the current setting for the given locale category as
        tuple (language code, encoding).

        category may be one of the LC_* value except LC_ALL. It
        defaults to LC_CTYPE.

        Except for the code 'C', the language code corresponds to RFC
        1766.  code and encoding can be None in case the values cannot
        be determined.

    s   ;s    category LC_ALL is not supportedN(   s
   _setlocales   categorys
   localenames   LC_ALLs	   TypeErrors   _parse_localename(   s   categorys
   localename(    (    s   /usr/lib/python2.2/locale.pys	   getlocaleTs
   c    sV   fpq| o t |  t d  j	 o st t |   } n tt |  |  Sd S(   sE   Set the locale for the given category.  The locale can be
        a string, a locale tuple (language code, encoding), or None.

        Locale tuples are converted to strings the locale aliasing
        engine.  Locale strings are passed directly to the C lib.

        category may be given as one of the LC_* values.

    s    N(   s   locales   types	   normalizes   _build_localenames
   _setlocales   category(   s   categorys   locale(    (    s   /usr/lib/python2.2/locale.pys	   setlocalefs   
#c    s#   v}~t  |  t t     d S(   s    Sets the locale for category to the default setting.

        The default setting is determined by calling
        getdefaultlocale(). category defaults to LC_ALL.

    N(   s
   _setlocales   categorys   _build_localenames   getdefaultlocale(   s   category(    (    s   /usr/lib/python2.2/locale.pys   resetlocalevs   s   Cs   437s   cs	   ISO8859-1s   iso8859s   8859s   88591s   asciis   ens   iso88591s
   iso_8859-1s
   ISO8859-15s   885915s	   iso885915s   iso_8859-15s	   ISO8859-2s	   iso8859-2s   iso88592s
   iso_8859-2s	   ISO8859-5s   iso88595s	   ISO8859-6s   iso88596s	   ISO8859-7s   iso88597s	   ISO8859-8s   iso88598s	   ISO8859-9s   iso88599s   JIS7s   iso-2022-jps   jiss   jis7s   SJISs   sjiss   TACTISs   tis620s   eucJPs   ajecs   eucjps   ujiss   utfs   utf-8s   utf8s	   utf8@ucs4s   en_US.ISO8859-1s   americans   ar_AA.ISO8859-6s   ars   ar_aas   ar_SA.ISO8859-6s   ar_sas   arabics   bg_BG.ISO8859-5s   bgs   bg_bgs	   bulgarians   fr_CA.ISO8859-1s   c-frenchs   c_cs   cextends   zh_CN.eucCNs	   chinese-ss   zh_TW.eucTWs	   chinese-ts   hr_HR.ISO8859-2s   croatians   cs_CZ.ISO8859-2s   css   cs_css   cs_czs   cz_CZ.ISO8859-2s   czs   cz_czs   cs_CS.ISO8859-2s   czechs   da_DK.ISO8859-1s   das   da_dks   danishs   de_DE.ISO8859-1s   des   de_AT.ISO8859-1s   de_ats   de_CH.ISO8859-1s   de_chs   de_des   nl_BE.ISO8859-1s   dutchs   ee_EE.ISO8859-4s   ees   el_GR.ISO8859-7s   els   el_grs   en_AU.ISO8859-1s   en_aus   en_CA.ISO8859-1s   en_cas   en_GB.ISO8859-1s   en_gbs   en_IE.ISO8859-1s   en_ies   en_NZ.ISO8859-1s   en_nzs   en_uks   en_uss   eng_gbs   en_EN.ISO8859-1s   englishs
   english_uks   english_united-statess
   english_uss   es_ES.ISO8859-1s   ess   es_AR.ISO8859-1s   es_ars   es_BO.ISO8859-1s   es_bos   es_CL.ISO8859-1s   es_cls   es_CO.ISO8859-1s   es_cos   es_CR.ISO8859-1s   es_crs   es_EC.ISO8859-1s   es_ecs   es_ess   es_GT.ISO8859-1s   es_gts   es_MX.ISO8859-1s   es_mxs   es_NI.ISO8859-1s   es_nis   es_PA.ISO8859-1s   es_pas   es_PE.ISO8859-1s   es_pes   es_PY.ISO8859-1s   es_pys   es_SV.ISO8859-1s   es_svs   es_UY.ISO8859-1s   es_uys   es_VE.ISO8859-1s   es_ves   et_EE.ISO8859-4s   ets   et_ees   fi_FI.ISO8859-1s   fis   fi_fis   finnishs   fr_FR.ISO8859-1s   frs   fr_BE.ISO8859-1s   fr_bes   fr_cas   fr_CH.ISO8859-1s   fr_chs   fr_frs   fre_frs   frenchs   french_frances   ger_des   germans   german_germanys   greeks   iw_IL.ISO8859-8s   hebrews   hrs   hr_hrs   hu_HU.ISO8859-2s   hus   hu_hus	   hungarians   is_IS.ISO8859-1s	   icelandics   id_ID.ISO8859-1s   ids   id_ids   iss   is_iss
   iso-8859-1s   en_US.ISO8859-15s   iso-8859-15s	   iso8859-1s
   iso8859-15s
   iso_8859_1s   iso_8859_15s   it_IT.ISO8859-1s   its   it_CH.ISO8859-1s   it_chs   it_its   italians   iws   iw_ils   ja_JP.eucJPs   jas
   ja_JP.JIS7s   ja.jiss
   ja_JP.SJISs   ja.sjiss   ja_jps
   ja_jp.ajecs	   ja_jp.eucs   ja_jp.eucjps   ja_jp.iso-2022-jps	   ja_jp.jiss
   ja_jp.jis7s   ja_jp.mscodes
   ja_jp.sjiss
   ja_jp.ujiss   japans   japaneses   japanese-eucs   japanese.eucs   jp_jps   ko_KR.eucKRs   kos   ko_krs	   ko_kr.eucs   koreans   lt_LT.ISO8859-4s   lts   lv_LV.ISO8859-4s   lvs   mk_MK.ISO8859-5s   mks   mk_mks   nl_NL.ISO8859-1s   nls   nl_bes   nl_nls   no_NO.ISO8859-1s   nos   no_nos	   norwegians   pl_PL.ISO8859-2s   pls   pl_pls   polishs   pt_PT.ISO8859-1s
   portugueses   pt_BR.ISO8859-1s   portuguese_brazils   posixs
   posix-utf2s   pts   pt_brs   pt_pts   ro_RO.ISO8859-2s   ros   ro_ros   ru_RU.ISO8859-5s   rus   ru_rus   rumanians   russians   sh_YU.ISO8859-2s   serbocroatians   shs   sh_HR.ISO8859-2s   sh_hrs   sh_sps   sh_yus   sk_SK.ISO8859-2s   sks   sk_sks   sl_CS.ISO8859-2s   sls   sl_css   sl_SI.ISO8859-2s   sl_sis   slovaks   slovenes   sp_YU.ISO8859-5s   sps   sp_yus   spanishs   spanish_spains   sr_SP.ISO8859-2s   sr_sps   sv_SE.ISO8859-1s   svs   sv_ses   swedishs   th_TH.TACTISs   th_ths   tr_TR.ISO8859-9s   trs   tr_trs   turkishs	   en_US.utfs   univs	   universals   zhs   zh_cns
   zh_cn.big5s	   zh_cn.eucs   zh_tws	   zh_tw.eucs   zh_TWi  s   zh_CNi  s   da_DKi  s   nl_NLi  s   en_USi	  s   en_UKi	  s   en_AUi	  s   en_CAi	  s   en_NZi	  s   en_IEi	  s   en_ZAi	  s   fi_FIi  s   fr_FRi  s   fr_BEi  s   fr_CAi  s   fr_CHi  s   de_DEi  s   el_GRi  s   iw_ILi  s   is_ISi  s   it_ITi  s   ja_JAi  s   no_NOi  s   pt_PTi  s   es_ESi
  s   sw_KEiA  s   sv_SEi  s   sv_FIi  s   tr_TRi  c     sZ  h  } | d  } |   | d =d GHd d GHt   \ }  } d G|  p d GHd G| p d GHHd	 GHd d GHxh | i   D]W \ } } | Gd
 GHt |  \ }  } d G|  p d GHd G| p d GHHq WHd GHd d GHt	   xh | i   D]W \ } } | Gd
 GHt |  \ }  } d G|  p d GHd G| p d GHHq6Wy t
 t d  Wn" d GHd GHd GHn XHd GHd d GHxh | i   D]W \ } } | Gd
 GHt |  \ }  } d G|  p d GHd G| p d GHHqWd S(   s    Test function.
    c    sR   xE t    i   D]1 \ } } | d  d j o | |  | <n q Wd  S(   Ni   s   LC_(   s   globalss   itemss   ks   vs
   categories(   s
   categoriess   ks   v(    (    s   /usr/lib/python2.2/locale.pys   _init_categoriess    s   LC_ALLs4   Locale defaults as determined by getdefaultlocale():s   -iH   s
   Language: s   (undefined)s
   Encoding: s   Locale settings on startup:s   ...s      Language: s      Encoding: s,   Locale settings after calling resetlocale():s    s   NOTE:s9   setlocale(LC_ALL, "") does not support the default locales&   given in the OS environment variables.s4   Locale settings after calling setlocale(LC_ALL, ""):N(   s
   categoriess   _init_categoriess   getdefaultlocales   langs   encs   itemss   names   categorys	   getlocales   resetlocales	   setlocales   LC_ALL(   s   langs   categorys   encs   names   _init_categoriess
   categories(    (    s   /usr/lib/python2.2/locale.pys   _print_locales^   	

 
  s   LC_MESSAGESs   __main__s   Locale aliasing:s   Number formatting:((   s   __doc__s   syss   __all__s   _locales   ImportErrors   CHAR_MAXs   LC_ALLs
   LC_COLLATEs   LC_CTYPEs   LC_MESSAGESs   LC_MONETARYs
   LC_NUMERICs   LC_TIMEs
   ValueErrors   Errors
   localeconvs   Nones	   setlocales   strcolls   strxfrms   _groups   formats   strs   floats   atofs   atois   _tests
   _setlocales	   normalizes   _parse_localenames   _build_localenames   getdefaultlocales	   getlocales   resetlocales   encoding_aliass   locale_aliass   windows_locales   _print_locales   appends   __name__(    s
   LC_NUMERICs   _build_localenames   windows_locales	   setlocales   _tests   strxfrms   LC_CTYPEs   syss   resetlocales	   normalizes   atois
   _setlocales   Errors   encoding_aliass   LC_ALLs   atofs   LC_TIMEs   locale_aliass   CHAR_MAXs   _parse_localenames   LC_MESSAGESs   __all__s   LC_MONETARYs   strcolls
   localeconvs   formats   _print_locales   getdefaultlocales   strs	   getlocales   _groups
   LC_COLLATE(    (    s   /usr/lib/python2.2/locale.pys   ? sr   9									$	53 !)      u  :
