Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(44)  |  Call(12)  |  Derive(0)  |  Import(32)
Return the dictionary for the given key in the global data.

The global data is stored in the ``babel/global.dat`` file and contains
information independent of individual locales.

>>> get_global('zone_aliases')['UTC']
u'Etc/GMT'
>>> get_global('zone_territories')['Europe/Berlin']
u'DE'
(more...)

        def get_global(key):
    """Return the dictionary for the given key in the global data.

    The global data is stored in the ``babel/global.dat`` file and contains
    information independent of individual locales.

    >>> get_global('zone_aliases')['UTC']
    u'Etc/GMT'
    >>> get_global('zone_territories')['Europe/Berlin']
    u'DE'

    .. versionadded:: 0.9

    :param key: the data key
    """
    global _global_data
    if _global_data is None:
        dirname = os.path.join(os.path.dirname(__file__))
        filename = os.path.join(dirname, 'global.dat')
        if not os.path.isfile(filename):
            _raise_no_data_error()
        fileobj = open(filename, 'rb')
        try:
            _global_data = pickle.load(fileobj)
        finally:
            fileobj.close()
    return _global_data.get(key, {})
        


src/s/t/stackgeek-gaeb-HEAD/lib/externals/babel/dates.py   stackgeek-gaeb(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/b/o/bomfu-HEAD/boilerplate/external/babel/dates.py   bomfu(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/l/i/livepythonconsole-app-engine-HEAD/boilerplate/external/babel/dates.py   livepythonconsole-app-engine(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/k/u/kuma-lib-HEAD/packages/Babel/babel/dates.py   kuma-lib(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/a/l/algae-HEAD/gae/libs/babel/dates.py   algae(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/p/l/plexnet-HEAD/third_party/python/babel/dates.py   plexnet(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/i/n/input-lib-HEAD/packages/Babel/babel/dates.py   input-lib(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/p/l/playdoh-lib-HEAD/lib/python/babel/dates.py   playdoh-lib(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/w/e/WebPutty-HEAD/libs/babel/dates.py   WebPutty(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/m/e/me-HEAD/libs/babel/dates.py   me(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

Previous  1 | 2 | 3 | 4  Next