X7ROOT File Manager
Current Path:
/opt/alt/python27/lib64/python2.7/encodings
opt
/
alt
/
python27
/
lib64
/
python2.7
/
encodings
/
ðŸ“
..
📄
__init__.py
(5.56 KB)
📄
__init__.pyc
(4.33 KB)
📄
__init__.pyo
(4.33 KB)
📄
aliases.py
(14.5 KB)
📄
aliases.pyc
(8.58 KB)
📄
aliases.pyo
(8.58 KB)
📄
ascii.py
(1.22 KB)
📄
ascii.pyc
(2.35 KB)
📄
ascii.pyo
(2.35 KB)
📄
base64_codec.py
(2.32 KB)
📄
base64_codec.pyc
(3.94 KB)
📄
base64_codec.pyo
(3.79 KB)
📄
big5.py
(1019 B)
📄
big5.pyc
(1.82 KB)
📄
big5.pyo
(1.82 KB)
📄
big5hkscs.py
(1.01 KB)
📄
big5hkscs.pyc
(1.86 KB)
📄
big5hkscs.pyo
(1.86 KB)
📄
bz2_codec.py
(2.96 KB)
📄
bz2_codec.pyc
(4.87 KB)
📄
bz2_codec.pyo
(4.74 KB)
📄
charmap.py
(2.04 KB)
📄
charmap.pyc
(3.61 KB)
📄
charmap.pyo
(3.61 KB)
📄
cp037.py
(13.06 KB)
📄
cp037.pyc
(2.93 KB)
📄
cp037.pyo
(2.93 KB)
📄
cp1006.py
(13.5 KB)
📄
cp1006.pyc
(3.02 KB)
📄
cp1006.pyo
(3.02 KB)
📄
cp1026.py
(13.06 KB)
📄
cp1026.pyc
(2.95 KB)
📄
cp1026.pyo
(2.95 KB)
📄
cp1140.py
(13.05 KB)
📄
cp1140.pyc
(2.93 KB)
📄
cp1140.pyo
(2.93 KB)
📄
cp1250.py
(13.62 KB)
📄
cp1250.pyc
(2.97 KB)
📄
cp1250.pyo
(2.97 KB)
📄
cp1251.py
(13.3 KB)
📄
cp1251.pyc
(2.96 KB)
📄
cp1251.pyo
(2.96 KB)
📄
cp1252.py
(13.44 KB)
📄
cp1252.pyc
(2.97 KB)
📄
cp1252.pyo
(2.97 KB)
📄
cp1253.py
(13.04 KB)
📄
cp1253.pyc
(2.98 KB)
📄
cp1253.pyo
(2.98 KB)
📄
cp1254.py
(13.44 KB)
📄
cp1254.pyc
(2.97 KB)
📄
cp1254.pyo
(2.97 KB)
📄
cp1255.py
(12.42 KB)
📄
cp1255.pyc
(2.99 KB)
📄
cp1255.pyo
(2.99 KB)
📄
cp1256.py
(12.76 KB)
📄
cp1256.pyc
(2.97 KB)
📄
cp1256.pyo
(2.97 KB)
📄
cp1257.py
(13.31 KB)
📄
cp1257.pyc
(2.97 KB)
📄
cp1257.pyo
(2.97 KB)
📄
cp1258.py
(13.3 KB)
📄
cp1258.pyc
(2.97 KB)
📄
cp1258.pyo
(2.97 KB)
📄
cp424.py
(12.02 KB)
📄
cp424.pyc
(2.96 KB)
📄
cp424.pyo
(2.96 KB)
📄
cp437.py
(34 KB)
📄
cp437.pyc
(8.04 KB)
📄
cp437.pyo
(8.04 KB)
📄
cp500.py
(13.06 KB)
📄
cp500.pyc
(2.93 KB)
📄
cp500.pyo
(2.93 KB)
📄
cp720.py
(13.37 KB)
📄
cp720.pyc
(3.03 KB)
📄
cp720.pyo
(3.03 KB)
📄
cp737.py
(34.12 KB)
📄
cp737.pyc
(8.27 KB)
📄
cp737.pyo
(8.27 KB)
📄
cp775.py
(33.92 KB)
📄
cp775.pyc
(8.06 KB)
📄
cp775.pyo
(8.06 KB)
📄
cp850.py
(33.56 KB)
📄
cp850.pyc
(7.8 KB)
📄
cp850.pyo
(7.8 KB)
📄
cp852.py
(34.43 KB)
📄
cp852.pyc
(8.06 KB)
📄
cp852.pyo
(8.06 KB)
📄
cp855.py
(33.31 KB)
📄
cp855.pyc
(8.24 KB)
📄
cp855.pyo
(8.24 KB)
📄
cp856.py
(12.38 KB)
📄
cp856.pyc
(2.99 KB)
📄
cp856.pyo
(2.99 KB)
📄
cp857.py
(33.36 KB)
📄
cp857.pyc
(7.79 KB)
📄
cp857.pyo
(7.79 KB)
📄
cp858.py
(33.47 KB)
📄
cp858.pyc
(7.77 KB)
📄
cp858.pyo
(7.77 KB)
📄
cp860.py
(34.12 KB)
📄
cp860.pyc
(8.03 KB)
📄
cp860.pyo
(8.03 KB)
📄
cp861.py
(34.07 KB)
📄
cp861.pyc
(8.04 KB)
📄
cp861.pyo
(8.04 KB)
📄
cp862.py
(32.84 KB)
📄
cp862.pyc
(8.17 KB)
📄
cp862.pyo
(8.17 KB)
📄
cp863.py
(33.7 KB)
📄
cp863.pyc
(8.04 KB)
📄
cp863.pyo
(8.04 KB)
📄
cp864.py
(33.12 KB)
📄
cp864.pyc
(8.17 KB)
📄
cp864.pyo
(8.17 KB)
📄
cp865.py
(34.06 KB)
📄
cp865.pyc
(8.04 KB)
📄
cp865.pyo
(8.04 KB)
📄
cp866.py
(33.84 KB)
📄
cp866.pyc
(8.27 KB)
📄
cp866.pyo
(8.27 KB)
📄
cp869.py
(32.44 KB)
📄
cp869.pyc
(8.08 KB)
📄
cp869.pyo
(8.08 KB)
📄
cp874.py
(12.55 KB)
📄
cp874.pyc
(3.06 KB)
📄
cp874.pyo
(3.06 KB)
📄
cp875.py
(12.8 KB)
📄
cp875.pyc
(2.93 KB)
📄
cp875.pyo
(2.93 KB)
📄
cp932.py
(1023 B)
📄
cp932.pyc
(1.83 KB)
📄
cp932.pyo
(1.83 KB)
📄
cp949.py
(1023 B)
📄
cp949.pyc
(1.83 KB)
📄
cp949.pyo
(1.83 KB)
📄
cp950.py
(1023 B)
📄
cp950.pyc
(1.83 KB)
📄
cp950.pyo
(1.83 KB)
📄
euc_jis_2004.py
(1.03 KB)
📄
euc_jis_2004.pyc
(1.88 KB)
📄
euc_jis_2004.pyo
(1.88 KB)
📄
euc_jisx0213.py
(1.03 KB)
📄
euc_jisx0213.pyc
(1.88 KB)
📄
euc_jisx0213.pyo
(1.88 KB)
📄
euc_jp.py
(1 KB)
📄
euc_jp.pyc
(1.83 KB)
📄
euc_jp.pyo
(1.83 KB)
📄
euc_kr.py
(1 KB)
📄
euc_kr.pyc
(1.83 KB)
📄
euc_kr.pyo
(1.83 KB)
📄
gb18030.py
(1.01 KB)
📄
gb18030.pyc
(1.84 KB)
📄
gb18030.pyo
(1.84 KB)
📄
gb2312.py
(1 KB)
📄
gb2312.pyc
(1.83 KB)
📄
gb2312.pyo
(1.83 KB)
📄
gbk.py
(1015 B)
📄
gbk.pyc
(1.81 KB)
📄
gbk.pyo
(1.81 KB)
📄
hex_codec.py
(2.29 KB)
📄
hex_codec.pyc
(3.89 KB)
📄
hex_codec.pyo
(3.74 KB)
📄
hp_roman8.py
(7.22 KB)
📄
hp_roman8.pyc
(4.18 KB)
📄
hp_roman8.pyo
(4.18 KB)
📄
hz.py
(1011 B)
📄
hz.pyc
(1.8 KB)
📄
hz.pyo
(1.8 KB)
📄
idna.py
(8.28 KB)
📄
idna.pyc
(6.43 KB)
📄
idna.pyo
(6.43 KB)
📄
iso2022_jp.py
(1.03 KB)
📄
iso2022_jp.pyc
(1.87 KB)
📄
iso2022_jp.pyo
(1.87 KB)
📄
iso2022_jp_1.py
(1.04 KB)
📄
iso2022_jp_1.pyc
(1.88 KB)
📄
iso2022_jp_1.pyo
(1.88 KB)
📄
iso2022_jp_2.py
(1.04 KB)
📄
iso2022_jp_2.pyc
(1.88 KB)
📄
iso2022_jp_2.pyo
(1.88 KB)
📄
iso2022_jp_2004.py
(1.05 KB)
📄
iso2022_jp_2004.pyc
(1.91 KB)
📄
iso2022_jp_2004.pyo
(1.91 KB)
📄
iso2022_jp_3.py
(1.04 KB)
📄
iso2022_jp_3.pyc
(1.88 KB)
📄
iso2022_jp_3.pyo
(1.88 KB)
📄
iso2022_jp_ext.py
(1.04 KB)
📄
iso2022_jp_ext.pyc
(1.9 KB)
📄
iso2022_jp_ext.pyo
(1.9 KB)
📄
iso2022_kr.py
(1.03 KB)
📄
iso2022_kr.pyc
(1.87 KB)
📄
iso2022_kr.pyo
(1.87 KB)
📄
iso8859_1.py
(13.12 KB)
📄
iso8859_1.pyc
(2.97 KB)
📄
iso8859_1.pyo
(2.97 KB)
📄
iso8859_10.py
(13.52 KB)
📄
iso8859_10.pyc
(2.98 KB)
📄
iso8859_10.pyo
(2.98 KB)
📄
iso8859_11.py
(12.3 KB)
📄
iso8859_11.pyc
(3.08 KB)
📄
iso8859_11.pyo
(3.08 KB)
📄
iso8859_13.py
(13.21 KB)
📄
iso8859_13.pyc
(2.99 KB)
📄
iso8859_13.pyo
(2.99 KB)
📄
iso8859_14.py
(13.58 KB)
📄
iso8859_14.pyc
(3 KB)
📄
iso8859_14.pyo
(3 KB)
📄
iso8859_15.py
(13.15 KB)
📄
iso8859_15.pyc
(2.98 KB)
📄
iso8859_15.pyo
(2.98 KB)
📄
iso8859_16.py
(13.49 KB)
📄
iso8859_16.pyc
(2.99 KB)
📄
iso8859_16.pyo
(2.99 KB)
📄
iso8859_2.py
(13.34 KB)
📄
iso8859_2.pyc
(2.97 KB)
📄
iso8859_2.pyo
(2.97 KB)
📄
iso8859_3.py
(13.03 KB)
📄
iso8859_3.pyc
(2.98 KB)
📄
iso8859_3.pyo
(2.98 KB)
📄
iso8859_4.py
(13.31 KB)
📄
iso8859_4.pyc
(2.97 KB)
📄
iso8859_4.pyo
(2.97 KB)
📄
iso8859_5.py
(12.96 KB)
📄
iso8859_5.pyc
(2.97 KB)
📄
iso8859_5.pyo
(2.97 KB)
📄
iso8859_6.py
(10.83 KB)
📄
iso8859_6.pyc
(3.01 KB)
📄
iso8859_6.pyo
(3.01 KB)
📄
iso8859_7.py
(12.79 KB)
📄
iso8859_7.pyc
(2.98 KB)
📄
iso8859_7.pyo
(2.98 KB)
📄
iso8859_8.py
(11.03 KB)
📄
iso8859_8.pyc
(3.01 KB)
📄
iso8859_8.pyo
(3.01 KB)
📄
iso8859_9.py
(13.1 KB)
📄
iso8859_9.pyc
(2.97 KB)
📄
iso8859_9.pyo
(2.97 KB)
📄
johab.py
(1023 B)
📄
johab.pyc
(1.83 KB)
📄
johab.pyo
(1.83 KB)
📄
koi8_r.py
(13.71 KB)
📄
koi8_r.pyc
(2.99 KB)
📄
koi8_r.pyo
(2.99 KB)
📄
koi8_u.py
(13.69 KB)
📄
koi8_u.pyc
(2.98 KB)
📄
koi8_u.pyo
(2.98 KB)
📄
latin_1.py
(1.23 KB)
📄
latin_1.pyc
(2.38 KB)
📄
latin_1.pyo
(2.38 KB)
📄
mac_arabic.py
(35.86 KB)
📄
mac_arabic.pyc
(8 KB)
📄
mac_arabic.pyo
(8 KB)
📄
mac_centeuro.py
(14.02 KB)
📄
mac_centeuro.pyc
(3.04 KB)
📄
mac_centeuro.pyo
(3.04 KB)
📄
mac_croatian.py
(13.56 KB)
📄
mac_croatian.pyc
(3.04 KB)
📄
mac_croatian.pyo
(3.04 KB)
📄
mac_cyrillic.py
(13.39 KB)
📄
mac_cyrillic.pyc
(3.04 KB)
📄
mac_cyrillic.pyo
(3.04 KB)
📄
mac_farsi.py
(15.06 KB)
📄
mac_farsi.pyc
(2.95 KB)
📄
mac_farsi.pyo
(2.95 KB)
📄
mac_greek.py
(13.65 KB)
📄
mac_greek.pyc
(2.99 KB)
📄
mac_greek.pyo
(2.99 KB)
📄
mac_iceland.py
(13.43 KB)
📄
mac_iceland.pyc
(3.03 KB)
📄
mac_iceland.pyo
(3.03 KB)
📄
mac_latin2.py
(8.36 KB)
📄
mac_latin2.pyc
(4.96 KB)
📄
mac_latin2.pyo
(4.96 KB)
📄
mac_roman.py
(13.41 KB)
📄
mac_roman.pyc
(3.01 KB)
📄
mac_roman.pyo
(3.01 KB)
📄
mac_romanian.py
(13.59 KB)
📄
mac_romanian.pyc
(3.05 KB)
📄
mac_romanian.pyo
(3.05 KB)
📄
mac_turkish.py
(13.45 KB)
📄
mac_turkish.pyc
(3.03 KB)
📄
mac_turkish.pyo
(3.03 KB)
📄
mbcs.py
(1.18 KB)
📄
mbcs.pyc
(2.1 KB)
📄
mbcs.pyo
(2.1 KB)
📄
palmos.py
(2.87 KB)
📄
palmos.pyc
(3.16 KB)
📄
palmos.pyo
(3.16 KB)
📄
ptcp154.py
(8.74 KB)
📄
ptcp154.pyc
(4.94 KB)
📄
ptcp154.pyo
(4.94 KB)
📄
punycode.py
(6.65 KB)
📄
punycode.pyc
(8.1 KB)
📄
punycode.pyo
(8.1 KB)
📄
quopri_codec.py
(2.14 KB)
📄
quopri_codec.pyc
(3.76 KB)
📄
quopri_codec.pyo
(3.69 KB)
📄
raw_unicode_escape.py
(1.18 KB)
📄
raw_unicode_escape.pyc
(2.29 KB)
📄
raw_unicode_escape.pyo
(2.29 KB)
📄
rot_13.py
(2.56 KB)
📄
rot_13.pyc
(3.75 KB)
📄
rot_13.pyo
(3.75 KB)
📄
shift_jis.py
(1.01 KB)
📄
shift_jis.pyc
(1.86 KB)
📄
shift_jis.pyo
(1.86 KB)
📄
shift_jis_2004.py
(1.03 KB)
📄
shift_jis_2004.pyc
(1.9 KB)
📄
shift_jis_2004.pyo
(1.9 KB)
📄
shift_jisx0213.py
(1.03 KB)
📄
shift_jisx0213.pyc
(1.9 KB)
📄
shift_jisx0213.pyo
(1.9 KB)
📄
string_escape.py
(953 B)
📄
string_escape.pyc
(2.15 KB)
📄
string_escape.pyo
(2.15 KB)
📄
tis_620.py
(12.26 KB)
📄
tis_620.pyc
(3.04 KB)
📄
tis_620.pyo
(3.04 KB)
📄
undefined.py
(1.27 KB)
📄
undefined.pyc
(2.7 KB)
📄
undefined.pyo
(2.7 KB)
📄
unicode_escape.py
(1.16 KB)
📄
unicode_escape.pyc
(2.24 KB)
📄
unicode_escape.pyo
(2.24 KB)
📄
unicode_internal.py
(1.17 KB)
📄
unicode_internal.pyc
(2.26 KB)
📄
unicode_internal.pyo
(2.26 KB)
📄
utf_16.py
(3.89 KB)
📄
utf_16.pyc
(5.34 KB)
📄
utf_16.pyo
(5.34 KB)
📄
utf_16_be.py
(1.01 KB)
📄
utf_16_be.pyc
(2.07 KB)
📄
utf_16_be.pyo
(2.07 KB)
📄
utf_16_le.py
(1.01 KB)
📄
utf_16_le.pyc
(2.07 KB)
📄
utf_16_le.pyo
(2.07 KB)
📄
utf_32.py
(5.01 KB)
📄
utf_32.pyc
(5.92 KB)
📄
utf_32.pyo
(5.92 KB)
📄
utf_32_be.py
(930 B)
📄
utf_32_be.pyc
(1.96 KB)
📄
utf_32_be.pyo
(1.96 KB)
📄
utf_32_le.py
(930 B)
📄
utf_32_le.pyc
(1.96 KB)
📄
utf_32_le.pyo
(1.96 KB)
📄
utf_7.py
(946 B)
📄
utf_7.pyc
(1.96 KB)
📄
utf_7.pyo
(1.96 KB)
📄
utf_8.py
(1005 B)
📄
utf_8.pyc
(2.02 KB)
📄
utf_8.pyo
(2.02 KB)
📄
utf_8_sig.py
(3.6 KB)
📄
utf_8_sig.pyc
(5.16 KB)
📄
utf_8_sig.pyo
(5.16 KB)
📄
uu_codec.py
(3.81 KB)
📄
uu_codec.pyc
(5.07 KB)
📄
uu_codec.pyo
(5 KB)
📄
zlib_codec.py
(2.98 KB)
📄
zlib_codec.pyc
(4.79 KB)
📄
zlib_codec.pyo
(4.66 KB)
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)
Upload File
Create Folder