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/h/u/hue-HEAD/desktop/core/ext-py/Babel-0.9.6/babel/dates.py   hue(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/s/o/socorro-HEAD/webapp-django/vendor/lib/python/babel/dates.py   socorro(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Babel-0.9.6/babel/dates.py   hortonworks-sandbox(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/p/r/proofofexistence-HEAD/babel/dates.py   proofofexistence(Download)
from bisect import bisect_right
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC, LOCALTZ
from babel._compat import string_types, integer_types, number_types

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

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

src/f/i/FireCheckIn-HEAD/kay/lib/babel/dates.py   FireCheckIn(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/k/a/kay-HEAD/kay/lib/babel/dates.py   kay(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

src/g/a/gae-boilerplate-HEAD/bp_includes/external/babel/dates.py   gae-boilerplate(Download)
import re
 
from babel.core import default_locale, get_global, Locale
from babel.util import UTC
 

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

Previous  1 | 2 | 3 | 4  Next