/usr/lib/python2.6/site-packages/babel
NameSizeModeActions
locale-data/-0755rm
localedata/-0755rm
localtime/-0755rm
messages/-0755rm
core.py311190644editdlrm
core.pyc325670644editdlrm
dates.py431110644editdlrm
dates.pyc424820644editdlrm
global.dat1096970644editdlrm
languages.py27480644editdlrm
languages.pyc32960644editdlrm
lists.py12710644editdlrm
lists.pyc14660644editdlrm
localedata.py62470644editdlrm
localedata.pyc75630644editdlrm
numbers.py232250644editdlrm
numbers.pyc223750644editdlrm
plural.py160210644editdlrm
plural.pyc201890644editdlrm
support.py218120644editdlrm
support.pyc255100644editdlrm
units.py110880644editdlrm
units.pyc92160644editdlrm
util.py81670644editdlrm
util.pyc108020644editdlrm
_compat.py11050644editdlrm
_compat.pyc24620644editdlrm
__init__.py7100644editdlrm
__init__.pyc9350644editdlrm
Edit: /usr/lib/python2.6/site-packages/babel/localedata.pyc (7563B)
Ñò zDVc@sÈdZddkZddkZddklZddklZhZeiƒZ ei i ei i e ƒdƒZd„Zd„Zed„Zd „Zd efd „ƒYZd efd „ƒYZdS(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(tMutableMapping(tpicklet localedatacCs5|tjotStiitiitd|ƒƒS(s²Check whether locale data is available for the given locale. Ther return value is `True` if it exists, `False` otherwise. :param name: the locale identifier string s%s.dat(t_cachetTruetostpathtexiststjoint_dirname(tname((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyRs cCssg}g}titƒD]}|tii|ƒq~D]1\}}|djo|djo ||q;q;~S(s¦Return a list of all locale identifiers for which locale data is available. .. versionadded:: 0.8.1 :return: a list of locale identifiers (strings) s.dattroot(RtlistdirR Rtsplitext(t_[1]t_[2]tfilenametstemt extension((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pytlocale_identifiers&s@c Cs/tiƒzti|ƒ}|põ|djp| o h}nR|idƒ}t|ƒdjo d}ndi|d ƒ}t|ƒiƒ}t i it d|ƒ}t |dƒ}zK|djo!|ot |ti|ƒƒnti|ƒ}|t|>> d = load('en_US') >>> d['languages']['sv'] u'Swedish' Note that the results are cached, and subsequent requests for the same locale return the same dictionary: >>> d1 = load('en_US') >>> d2 = load('en_US') >>> d1 is d2 True :param name: the locale identifier string (or "root") :param merge_inherited: whether the inherited data should be merged into the data of the requested locale :raise `IOError`: if no locale data file is found for the given locale identifer, or one of the locales it inherits from R t_iiÿÿÿÿs%s.dattrbN(t _cache_locktacquireRtgettsplittlenRtloadtcopyRRR topentmergeRtclosetrelease(R tmerge_inheritedtdatatpartstparentRtfileobj((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyR3s*   cCsúxó|iƒD]å\}}|dj oÌ|i|ƒ}t|tƒo™|djo h}nt|tƒo||f}qät|tƒo5|\}}|iƒ}t||ƒ||f}qä|iƒ}t||ƒn|}|||>> d = {1: 'foo', 3: 'baz'} >>> merge(d, {1: 'Foo', 2: 'Bar'}) >>> items = d.items(); items.sort(); items [(1, 'Foo'), (2, 'Bar'), (3, 'baz')] :param dict1: the dictionary to merge into :param dict2: the dictionary containing the data that should be merged N( titemstNoneRt isinstancetdicttAliasttupleRR(tdict1tdict2tkeytval2tval1taliastothers((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyRis$        R*cBs)eZdZd„Zd„Zd„ZRS(sŸRepresentation of an alias in the locale data. An alias is a value that refers to some other part of the locale data, as specified by the `keys`. cCst|ƒ|_dS(N(R+tkeys(tselfR3((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt__init__‘scCsdt|ƒi|ifS(Ns<%s %r>(ttypet__name__R3(R4((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt__repr__”scCsz|}x|iD]}||}qWt|tƒo|i|ƒ}n0t|tƒo|\}}|i|ƒ}n|S(sôResolve the alias based on the given data. This is done recursively, so if one alias resolves to a second alias, that second alias will also be resolved. :param data: the locale data :type data: `dict` (R3R(R*tresolveR+(R4R"tbaseR.R1R2((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyR9—s   (R7t __module__t__doc__R5R8R9(((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyR*Šs  tLocaleDataDictcBsPeZdZdd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( sUDictionary wrapper that automatically resolves aliases to the actual values. cCs-||_|djo |}n||_dS(N(t_dataR'R:(R4R"R:((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyR5°s   cCs t|iƒS(N(RR>(R4((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt__len__¶scCs t|iƒS(N(titerR>(R4((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt__iter__¹scCsÊ|i|}}t|tƒo|i|iƒ}nt|tƒo5|\}}|i|iƒiƒ}t||ƒnt|ƒt jot |d|iƒ}n||j o||i|R(R*R9R:R+RRR6R)R=(R4R.torigtvalR1R2((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt __getitem__¼s  cCs||i|(R4R.tvalue((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt __setitem__ÊscCs|i|=dS(N(R>(R4R.((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt __delitem__ÍscCst|iiƒd|iƒS(NR:(R=R>RR:(R4((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyRÐsN( R7R;R<R'R5R?RARDRFRGR(((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyR=«s      (R<Rt threadingt collectionsRt babel._compatRRtRLockRRRtdirnamet__file__R RRRRRtobjectR*R=(((s//tmp/pip-build-lt8jXN/Babel/babel/localedata.pyt s   ! 6 !!