"""Python 3 compatibility shims """ import sys if sys.version_info[0] < 3: PY3 = False def b(s): return s try: from cStringIO import StringIO except ImportError: from StringIO import StringIO BytesIO = StringIO text_type = unicode binary_type = str string_types = (basestring,) integer_types = (int, long) unichr = unichr reload_module = reload else: PY3 = True if sys.version_info[:2] >= (3, 4): from importlib import reload as reload_module else: from imp import reload as reload_module def b(s): return bytes(s, 'latin1') from io import StringIO, BytesIO text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) unichr = chr long_type = integer_types[-1]
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
tests | Folder | 0755 |
|
|
__init__.py | File | 22.95 KB | 0644 |
|
_speedups.cpython-311-x86_64-linux-gnu.so | File | 271.95 KB | 0755 |
|
compat.py | File | 815 B | 0644 |
|
decoder.py | File | 14.78 KB | 0644 |
|
encoder.py | File | 28.41 KB | 0644 |
|
errors.py | File | 1.74 KB | 0644 |
|
ordered_dict.py | File | 2.88 KB | 0644 |
|
raw_json.py | File | 217 B | 0644 |
|
scanner.py | File | 2.96 KB | 0644 |
|
tool.py | File | 1.11 KB | 0644 |
|