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/f/j/fjord-HEAD/vendor/packages/Babel/babel/localtime/_win32.py   fjord(Download)
        winreg = None
 
from babel.core import get_global
import pytz
 
 
tz_names = get_global('windows_zone_mapping')

src/m/i/microblog-HEAD/flask/lib/python2.7/site-packages/babel/localtime/_win32.py   microblog(Download)
        winreg = None
 
from babel.core import get_global
import pytz
 
 
tz_names = get_global('windows_zone_mapping')

src/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/babel/localtime/_win32.py   ZenPacks.zenoss.OpenStack(Download)
        winreg = None
 
from babel.core import get_global
import pytz
 
 
tz_names = get_global('windows_zone_mapping')

src/b/a/Babel-1.3/babel/localtime/_win32.py   Babel(Download)
        winreg = None
 
from babel.core import get_global
import pytz
 
 
tz_names = get_global('windows_zone_mapping')

src/p/r/proofofexistence-HEAD/babel/numbers.py   proofofexistence(Download)
from datetime import date as date_, datetime as datetime_
 
from babel.core import default_locale, Locale, get_global
from babel._compat import range_type
 
                            ``'from'``, ``'to'``, and ``'tender'``.
    """
    currencies = get_global('territory_currencies')
    if start_date is None:
        start_date = date_.today()

src/p/r/proofofexistence-HEAD/babel/localtime/_win32.py   proofofexistence(Download)
        winreg = None
 
from babel.core import get_global
import pytz
 
# the mapping was empty.
try:
    tz_names = get_global('windows_zone_mapping')
except RuntimeError:
    tz_names = {}

src/f/j/fjord-HEAD/vendor/packages/Babel/babel/dates.py   fjord(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/m/i/microblog-HEAD/flask/lib/python2.7/site-packages/babel/dates.py   microblog(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/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/babel/dates.py   ZenPacks.zenoss.OpenStack(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/b/a/Babel-1.3/babel/dates.py   Babel(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

  1 | 2 | 3 | 4  Next