PATH: //opt/alt/python27/lib64/python2.7/encodings
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📄 __init__.pyc
↓
X
📄 __init__.pyo
↓
X
📄 aliases.py
↓
X
📄 aliases.pyc
↓
X
📄 aliases.pyo
↓
X
📄 ascii.py
↓
X
📄 ascii.pyc
↓
X
📄 ascii.pyo
↓
X
📄 base64_codec.py
↓
X
📄 base64_codec.pyc
↓
X
📄 base64_codec.pyo
↓
X
📄 big5.py
↓
X
📄 big5.pyc
↓
X
📄 big5.pyo
↓
X
📄 big5hkscs.py
↓
X
📄 big5hkscs.pyc
↓
X
📄 big5hkscs.pyo
↓
X
📄 bz2_codec.py
↓
X
📄 bz2_codec.pyc
↓
X
📄 bz2_codec.pyo
↓
X
📄 charmap.py
↓
X
📄 charmap.pyc
↓
X
📄 charmap.pyo
↓
X
📄 cp037.py
↓
X
📄 cp037.pyc
↓
X
📄 cp037.pyo
↓
X
📄 cp1006.py
↓
X
📄 cp1006.pyc
↓
X
📄 cp1006.pyo
↓
X
📄 cp1026.py
↓
X
📄 cp1026.pyc
↓
X
📄 cp1026.pyo
↓
X
📄 cp1140.py
↓
X
📄 cp1140.pyc
↓
X
📄 cp1140.pyo
↓
X
📄 cp1250.py
↓
X
📄 cp1250.pyc
↓
X
📄 cp1250.pyo
↓
X
📄 cp1251.py
↓
X
📄 cp1251.pyc
↓
X
📄 cp1251.pyo
↓
X
📄 cp1252.py
↓
X
📄 cp1252.pyc
↓
X
📄 cp1252.pyo
↓
X
📄 cp1253.py
↓
X
📄 cp1253.pyc
↓
X
📄 cp1253.pyo
↓
X
📄 cp1254.py
↓
X
📄 cp1254.pyc
↓
X
📄 cp1254.pyo
↓
X
📄 cp1255.py
↓
X
📄 cp1255.pyc
↓
X
📄 cp1255.pyo
↓
X
📄 cp1256.py
↓
X
📄 cp1256.pyc
↓
X
📄 cp1256.pyo
↓
X
📄 cp1257.py
↓
X
📄 cp1257.pyc
↓
X
📄 cp1257.pyo
↓
X
📄 cp1258.py
↓
X
📄 cp1258.pyc
↓
X
📄 cp1258.pyo
↓
X
📄 cp424.py
↓
X
📄 cp424.pyc
↓
X
📄 cp424.pyo
↓
X
📄 cp437.py
↓
X
📄 cp437.pyc
↓
X
📄 cp437.pyo
↓
X
📄 cp500.py
↓
X
📄 cp500.pyc
↓
X
📄 cp500.pyo
↓
X
📄 cp720.py
↓
X
📄 cp720.pyc
↓
X
📄 cp720.pyo
↓
X
📄 cp737.py
↓
X
📄 cp737.pyc
↓
X
📄 cp737.pyo
↓
X
📄 cp775.py
↓
X
📄 cp775.pyc
↓
X
📄 cp775.pyo
↓
X
📄 cp850.py
↓
X
📄 cp850.pyc
↓
X
📄 cp850.pyo
↓
X
📄 cp852.py
↓
X
📄 cp852.pyc
↓
X
📄 cp852.pyo
↓
X
📄 cp855.py
↓
X
📄 cp855.pyc
↓
X
📄 cp855.pyo
↓
X
📄 cp856.py
↓
X
📄 cp856.pyc
↓
X
📄 cp856.pyo
↓
X
📄 cp857.py
↓
X
📄 cp857.pyc
↓
X
📄 cp857.pyo
↓
X
📄 cp858.py
↓
X
📄 cp858.pyc
↓
X
📄 cp858.pyo
↓
X
📄 cp860.py
↓
X
📄 cp860.pyc
↓
X
📄 cp860.pyo
↓
X
📄 cp861.py
↓
X
📄 cp861.pyc
↓
X
📄 cp861.pyo
↓
X
📄 cp862.py
↓
X
📄 cp862.pyc
↓
X
📄 cp862.pyo
↓
X
📄 cp863.py
↓
X
📄 cp863.pyc
↓
X
📄 cp863.pyo
↓
X
📄 cp864.py
↓
X
📄 cp864.pyc
↓
X
📄 cp864.pyo
↓
X
📄 cp865.py
↓
X
📄 cp865.pyc
↓
X
📄 cp865.pyo
↓
X
📄 cp866.py
↓
X
📄 cp866.pyc
↓
X
📄 cp866.pyo
↓
X
📄 cp869.py
↓
X
📄 cp869.pyc
↓
X
📄 cp869.pyo
↓
X
📄 cp874.py
↓
X
📄 cp874.pyc
↓
X
📄 cp874.pyo
↓
X
📄 cp875.py
↓
X
📄 cp875.pyc
↓
X
📄 cp875.pyo
↓
X
📄 cp932.py
↓
X
📄 cp932.pyc
↓
X
📄 cp932.pyo
↓
X
📄 cp949.py
↓
X
📄 cp949.pyc
↓
X
📄 cp949.pyo
↓
X
📄 cp950.py
↓
X
📄 cp950.pyc
↓
X
📄 cp950.pyo
↓
X
📄 euc_jis_2004.py
↓
X
📄 euc_jis_2004.pyc
↓
X
📄 euc_jis_2004.pyo
↓
X
📄 euc_jisx0213.py
↓
X
📄 euc_jisx0213.pyc
↓
X
📄 euc_jisx0213.pyo
↓
X
📄 euc_jp.py
↓
X
📄 euc_jp.pyc
↓
X
📄 euc_jp.pyo
↓
X
📄 euc_kr.py
↓
X
📄 euc_kr.pyc
↓
X
📄 euc_kr.pyo
↓
X
📄 gb18030.py
↓
X
📄 gb18030.pyc
↓
X
📄 gb18030.pyo
↓
X
📄 gb2312.py
↓
X
📄 gb2312.pyc
↓
X
📄 gb2312.pyo
↓
X
📄 gbk.py
↓
X
📄 gbk.pyc
↓
X
📄 gbk.pyo
↓
X
📄 hex_codec.py
↓
X
📄 hex_codec.pyc
↓
X
📄 hex_codec.pyo
↓
X
📄 hp_roman8.py
↓
X
📄 hp_roman8.pyc
↓
X
📄 hp_roman8.pyo
↓
X
📄 hz.py
↓
X
📄 hz.pyc
↓
X
📄 hz.pyo
↓
X
📄 idna.py
↓
X
📄 idna.pyc
↓
X
📄 idna.pyo
↓
X
📄 iso2022_jp.py
↓
X
📄 iso2022_jp.pyc
↓
X
📄 iso2022_jp.pyo
↓
X
📄 iso2022_jp_1.py
↓
X
📄 iso2022_jp_1.pyc
↓
X
📄 iso2022_jp_1.pyo
↓
X
📄 iso2022_jp_2.py
↓
X
📄 iso2022_jp_2.pyc
↓
X
📄 iso2022_jp_2.pyo
↓
X
📄 iso2022_jp_2004.py
↓
X
📄 iso2022_jp_2004.pyc
↓
X
📄 iso2022_jp_2004.pyo
↓
X
📄 iso2022_jp_3.py
↓
X
📄 iso2022_jp_3.pyc
↓
X
📄 iso2022_jp_3.pyo
↓
X
📄 iso2022_jp_ext.py
↓
X
📄 iso2022_jp_ext.pyc
↓
X
📄 iso2022_jp_ext.pyo
↓
X
📄 iso2022_kr.py
↓
X
📄 iso2022_kr.pyc
↓
X
📄 iso2022_kr.pyo
↓
X
📄 iso8859_1.py
↓
X
📄 iso8859_1.pyc
↓
X
📄 iso8859_1.pyo
↓
X
📄 iso8859_10.py
↓
X
📄 iso8859_10.pyc
↓
X
📄 iso8859_10.pyo
↓
X
📄 iso8859_11.py
↓
X
📄 iso8859_11.pyc
↓
X
📄 iso8859_11.pyo
↓
X
📄 iso8859_13.py
↓
X
📄 iso8859_13.pyc
↓
X
📄 iso8859_13.pyo
↓
X
📄 iso8859_14.py
↓
X
📄 iso8859_14.pyc
↓
X
📄 iso8859_14.pyo
↓
X
📄 iso8859_15.py
↓
X
📄 iso8859_15.pyc
↓
X
📄 iso8859_15.pyo
↓
X
📄 iso8859_16.py
↓
X
📄 iso8859_16.pyc
↓
X
📄 iso8859_16.pyo
↓
X
📄 iso8859_2.py
↓
X
📄 iso8859_2.pyc
↓
X
📄 iso8859_2.pyo
↓
X
📄 iso8859_3.py
↓
X
📄 iso8859_3.pyc
↓
X
📄 iso8859_3.pyo
↓
X
📄 iso8859_4.py
↓
X
📄 iso8859_4.pyc
↓
X
📄 iso8859_4.pyo
↓
X
📄 iso8859_5.py
↓
X
📄 iso8859_5.pyc
↓
X
📄 iso8859_5.pyo
↓
X
📄 iso8859_6.py
↓
X
📄 iso8859_6.pyc
↓
X
📄 iso8859_6.pyo
↓
X
📄 iso8859_7.py
↓
X
📄 iso8859_7.pyc
↓
X
📄 iso8859_7.pyo
↓
X
📄 iso8859_8.py
↓
X
📄 iso8859_8.pyc
↓
X
📄 iso8859_8.pyo
↓
X
📄 iso8859_9.py
↓
X
📄 iso8859_9.pyc
↓
X
📄 iso8859_9.pyo
↓
X
📄 johab.py
↓
X
📄 johab.pyc
↓
X
📄 johab.pyo
↓
X
📄 koi8_r.py
↓
X
📄 koi8_r.pyc
↓
X
📄 koi8_r.pyo
↓
X
📄 koi8_u.py
↓
X
📄 koi8_u.pyc
↓
X
📄 koi8_u.pyo
↓
X
📄 latin_1.py
↓
X
📄 latin_1.pyc
↓
X
📄 latin_1.pyo
↓
X
📄 mac_arabic.py
↓
X
📄 mac_arabic.pyc
↓
X
📄 mac_arabic.pyo
↓
X
📄 mac_centeuro.py
↓
X
📄 mac_centeuro.pyc
↓
X
📄 mac_centeuro.pyo
↓
X
📄 mac_croatian.py
↓
X
📄 mac_croatian.pyc
↓
X
📄 mac_croatian.pyo
↓
X
📄 mac_cyrillic.py
↓
X
📄 mac_cyrillic.pyc
↓
X
📄 mac_cyrillic.pyo
↓
X
📄 mac_farsi.py
↓
X
📄 mac_farsi.pyc
↓
X
📄 mac_farsi.pyo
↓
X
📄 mac_greek.py
↓
X
📄 mac_greek.pyc
↓
X
📄 mac_greek.pyo
↓
X
📄 mac_iceland.py
↓
X
📄 mac_iceland.pyc
↓
X
📄 mac_iceland.pyo
↓
X
📄 mac_latin2.py
↓
X
📄 mac_latin2.pyc
↓
X
📄 mac_latin2.pyo
↓
X
📄 mac_roman.py
↓
X
📄 mac_roman.pyc
↓
X
📄 mac_roman.pyo
↓
X
📄 mac_romanian.py
↓
X
📄 mac_romanian.pyc
↓
X
📄 mac_romanian.pyo
↓
X
📄 mac_turkish.py
↓
X
📄 mac_turkish.pyc
↓
X
📄 mac_turkish.pyo
↓
X
📄 mbcs.py
↓
X
📄 mbcs.pyc
↓
X
📄 mbcs.pyo
↓
X
📄 palmos.py
↓
X
📄 palmos.pyc
↓
X
📄 palmos.pyo
↓
X
📄 ptcp154.py
↓
X
📄 ptcp154.pyc
↓
X
📄 ptcp154.pyo
↓
X
📄 punycode.py
↓
X
📄 punycode.pyc
↓
X
📄 punycode.pyo
↓
X
📄 quopri_codec.py
↓
X
📄 quopri_codec.pyc
↓
X
📄 quopri_codec.pyo
↓
X
📄 raw_unicode_escape.py
↓
X
📄 raw_unicode_escape.pyc
↓
X
📄 raw_unicode_escape.pyo
↓
X
📄 rot_13.py
↓
X
📄 rot_13.pyc
↓
X
📄 rot_13.pyo
↓
X
📄 shift_jis.py
↓
X
📄 shift_jis.pyc
↓
X
📄 shift_jis.pyo
↓
X
📄 shift_jis_2004.py
↓
X
📄 shift_jis_2004.pyc
↓
X
📄 shift_jis_2004.pyo
↓
X
📄 shift_jisx0213.py
↓
X
📄 shift_jisx0213.pyc
↓
X
📄 shift_jisx0213.pyo
↓
X
📄 string_escape.py
↓
X
📄 string_escape.pyc
↓
X
📄 string_escape.pyo
↓
X
📄 tis_620.py
↓
X
📄 tis_620.pyc
↓
X
📄 tis_620.pyo
↓
X
📄 undefined.py
↓
X
📄 undefined.pyc
↓
X
📄 undefined.pyo
↓
X
📄 unicode_escape.py
↓
X
📄 unicode_escape.pyc
↓
X
📄 unicode_escape.pyo
↓
X
📄 unicode_internal.py
↓
X
📄 unicode_internal.pyc
↓
X
📄 unicode_internal.pyo
↓
X
📄 utf_16.py
↓
X
📄 utf_16.pyc
↓
X
📄 utf_16.pyo
↓
X
📄 utf_16_be.py
↓
X
📄 utf_16_be.pyc
↓
X
📄 utf_16_be.pyo
↓
X
📄 utf_16_le.py
↓
X
📄 utf_16_le.pyc
↓
X
📄 utf_16_le.pyo
↓
X
📄 utf_32.py
↓
X
📄 utf_32.pyc
↓
X
📄 utf_32.pyo
↓
X
📄 utf_32_be.py
↓
X
📄 utf_32_be.pyc
↓
X
📄 utf_32_be.pyo
↓
X
📄 utf_32_le.py
↓
X
📄 utf_32_le.pyc
↓
X
📄 utf_32_le.pyo
↓
X
📄 utf_7.py
↓
X
📄 utf_7.pyc
↓
X
📄 utf_7.pyo
↓
X
📄 utf_8.py
↓
X
📄 utf_8.pyc
↓
X
📄 utf_8.pyo
↓
X
📄 utf_8_sig.py
↓
X
📄 utf_8_sig.pyc
↓
X
📄 utf_8_sig.pyo
↓
X
📄 uu_codec.py
↓
X
📄 uu_codec.pyc
↓
X
📄 uu_codec.pyo
↓
X
📄 zlib_codec.py
↓
X
📄 zlib_codec.pyc
↓
X
📄 zlib_codec.pyo
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: __init__.py
""" Standard "encodings" Package Standard Python encoding modules are stored in this package directory. Codec modules must have names corresponding to normalized encoding names as defined in the normalize_encoding() function below, e.g. 'utf-8' must be implemented by the module 'utf_8.py'. Each codec module must export the following interface: * getregentry() -> codecs.CodecInfo object The getregentry() API must a CodecInfo object with encoder, decoder, incrementalencoder, incrementaldecoder, streamwriter and streamreader atttributes which adhere to the Python Codec Interface Standard. In addition, a module may optionally also define the following APIs which are then used by the package's codec search function: * getaliases() -> sequence of encoding name strings to use as aliases Alias names returned by getaliases() must be normalized encoding names as defined by normalize_encoding(). Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs from encodings import aliases import __builtin__ _cache = {} _unknown = '--unknown--' _import_tail = ['*'] _norm_encoding_map = (' . ' '0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ ' ' abcdefghijklmnopqrstuvwxyz ' ' ' ' ' ' ') _aliases = aliases.aliases class CodecRegistryError(LookupError, SystemError): pass def normalize_encoding(encoding): """ Normalize an encoding name. Normalization works as follows: all non-alphanumeric characters except the dot used for Python package names are collapsed and replaced with a single underscore, e.g. ' -;#' becomes '_'. Leading and trailing underscores are removed. Note that encoding names should be ASCII only; if they do use non-ASCII characters, these must be Latin-1 compatible. """ # Make sure we have an 8-bit string, because .translate() works # differently for Unicode strings. if hasattr(__builtin__, "unicode") and isinstance(encoding, unicode): # Note that .encode('latin-1') does *not* use the codec # registry, so this call doesn't recurse. (See unicodeobject.c # PyUnicode_AsEncodedString() for details) encoding = encoding.encode('latin-1') return '_'.join(encoding.translate(_norm_encoding_map).split()) def search_function(encoding): # Cache lookup entry = _cache.get(encoding, _unknown) if entry is not _unknown: return entry # Import the module: # # First try to find an alias for the normalized encoding # name and lookup the module using the aliased name, then try to # lookup the module using the standard import scheme, i.e. first # try in the encodings package, then at top-level. # norm_encoding = normalize_encoding(encoding) aliased_encoding = _aliases.get(norm_encoding) or \ _aliases.get(norm_encoding.replace('.', '_')) if aliased_encoding is not None: modnames = [aliased_encoding, norm_encoding] else: modnames = [norm_encoding] for modname in modnames: if not modname or '.' in modname: continue try: # Import is absolute to prevent the possibly malicious import of a # module with side-effects that is not in the 'encodings' package. mod = __import__('encodings.' + modname, fromlist=_import_tail, level=0) except ImportError: pass else: break else: mod = None try: getregentry = mod.getregentry except AttributeError: # Not a codec module mod = None if mod is None: # Cache misses _cache[encoding] = None return None # Now ask the module for the registry entry entry = getregentry() if not isinstance(entry, codecs.CodecInfo): if not 4 <= len(entry) <= 7: raise CodecRegistryError,\ 'module "%s" (%s) failed to register' % \ (mod.__name__, mod.__file__) if not hasattr(entry[0], '__call__') or \ not hasattr(entry[1], '__call__') or \ (entry[2] is not None and not hasattr(entry[2], '__call__')) or \ (entry[3] is not None and not hasattr(entry[3], '__call__')) or \ (len(entry) > 4 and entry[4] is not None and not hasattr(entry[4], '__call__')) or \ (len(entry) > 5 and entry[5] is not None and not hasattr(entry[5], '__call__')): raise CodecRegistryError,\ 'incompatible codecs in module "%s" (%s)' % \ (mod.__name__, mod.__file__) if len(entry)<7 or entry[6] is None: entry += (None,)*(6-len(entry)) + (mod.__name__.split(".", 1)[1],) entry = codecs.CodecInfo(*entry) # Cache the codec registry entry _cache[encoding] = entry # Register its aliases (without overwriting previously registered # aliases) try: codecaliases = mod.getaliases() except AttributeError: pass else: for alias in codecaliases: if alias not in _aliases: _aliases[alias] = modname # Return the registry entry return entry # Register the search_function in the Python codec registry codecs.register(search_function)
SIMPAN PERUBAHAN