D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib
/
python2.7
/
site-packages
/
babel
/
Filename :
localedata.pyc
back
Copy
� #[abc @ s) d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l Z d d l m Z m Z d � Z i Z e j � Z e j j e � d � Z e j d e j � Z d � Z d � Z d � Z d � Z e d � Z d � Z d e f d � � YZ d e f d � � YZ d S( sB babel.localedata ~~~~~~~~~~~~~~~~ Low-level locale data access. :note: The `Locale` class, which uses this module under the hood, provides a more convenient interface for accessing the locale data. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. i����N( t MutableMapping( t chain( t picklet string_typesc C sF t t d t � r0 t t d d � r0 t j } n t j j t � } | S( Nt frozent _MEIPASS( t getattrt syst Falset NoneR t ost patht dirnamet __file__( t basedir( ( s4 /usr/lib/python2.7/site-packages/babel/localedata.pyt get_base_dir s $s locale-datas% ^(con|prn|aux|nul|com[0-9]|lpt[0-9])$c C sj | s t | t � r d S| j � j � } x6 t j t t � g � D] } | | j � k rF | SqF Wd S( s� Normalize a locale ID by stripping spaces and apply proper casing. Returns the normalized locale ID string or `None` if the ID is not recognized. N( t isinstanceR R t stript lowerR t from_iterablet _cachet locale_identifiers( t namet locale_id( ( s4 /usr/lib/python2.7/site-packages/babel/localedata.pyt normalize_locale) s c C sj t j j | � } t j d k rS t j t j j | � d � rS t d | � � n t j j t d | � S( s? Resolve a locale identifier to a `.dat` path on disk. t win32i s Name %s is invalid on Windowss %s.dat( R R t basenameR t platformt _windows_reserved_name_ret matcht splitextt ValueErrort joint _dirname( R ( ( s4 /usr/lib/python2.7/site-packages/babel/localedata.pyt resolve_locale_filename7 s .c C s] | s t | t � r t S| t k r+ t St j j t | � � } | rM t St t | � � S( s� Check whether locale data is available for the given locale. Returns `True` if it exists, `False` otherwise. :param name: the locale identifier string ( R R R R t TrueR R t existsR"