コード例 #1
0
ファイル: environment.py プロジェクト: sendjack/investor-list
def get_unicode(key):
    """Look up a environmental variable by key and return a unicode string by
    decoding the byte string to unicode with utf8."""
    if type(key) is not unicode:
        raise UnicodeError()
    byte_string = os.environ.get(str(key))
    return to_unicode(byte_string)
コード例 #2
0
ファイル: environment.py プロジェクト: sendjack/jutil
def get_unicode(key):
    """Look up a environmental variable by key and return a unicode string by
    decoding the byte string to unicode with utf8."""
    return to_unicode(_get_environmental_variable(key))