N
îųO5c       s     d  Z    k l  k Z  d   Z  d d  Z . d   Z 2 e i d  Z = d   Z A d   Z	 K e
 d j o L e	   n d	 S(
   s?   Support for number formatting using the current locale settingsc    s   	 t    } 
 | d }  | o  |  Sn  d }  x¨  |  o | o  | d t j o  Pn3  | d d j o  | d }  | d } n  | o  |  | | d | } n  |  | }  |  |  }  qA W |  o | o  |  | d | } n  | Sd  S(   Ns   groupings    i    i   s   thousands_sep(   s
   localeconvs   convs   groupings   ss   results   CHAR_MAXs   group(   s   ss   convs   groupings   results   groups0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   _group s&    	 
c    sē    " # |  | } $ t i | d  } % | o & t | d  | d <n ' t |  d j o" ( | d t	   d | d Sn2 ) t |  d j o * | d Sn , t
 d  d 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 stringN(   s   fs   vals   results   strings   splitfieldss   fieldss   groupings   _groups   lens
   localeconvs   Error(   s   fs   vals   groupings   results   fieldss0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   format s   
"i    c    s   . / 0 t  d |   Sd S(   s9   Convert float to integer, taking the locale into account.s   %.12gN(   s   formats   val(   s   vals0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   str. s   c    sy   2 3 5 t  i |  t   d  } 6 t  i | d  }  8 t  i |  t   d  } 9 t  i | d  }  ; | |   Sd S(   s<   Parses a string as a float according to the locale settings.s   thousands_seps    s   decimal_points   .N(   s   strings   splitfieldss   strs
   localeconvs   ss   joins   func(   s   strs   funcs   ss0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   atof2 s   c    s   = > ? t  |  t i  Sd S(   sA   Converts a string to an integer according to the locale settings.N(   s   atofs   strs   strings   atoi(   s   strs0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   atoi= s   c     sg   A B t  t d  D t d d d  }  E |  Gd Gt |   GHG t d  }  H |  Gd Gt |   GHd  S(   Ns    s   %diÍ[i   s   isf3.14(   s	   setlocales   LC_ALLs   formats   s1s   atois   strs   atof(   s   s1s0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   testA s
   s   __main__N(   s   __doc__s   _locales   *s   strings   _groups   formats   strs   atofs   atois   tests   __name__(    s0   /var/tmp/python-root/usr/lib/python1.5/locale.pys   ? s   
	
