"""Python 3 compatibility shims
"""
import sys
if sys.version_info[0] < 3:
PY3 = False
def b(s):
return s
def u(s):
return unicode(s, 'unicode_escape')
import cStringIO as StringIO
StringIO = BytesIO = StringIO.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
import codecs
def b(s):
return codecs.latin_1_encode(s)[0]
def u(s):
return s
import io
StringIO = io.StringIO
BytesIO = io.BytesIO
text_type = str
binary_type = bytes
string_types = (str,)
integer_types = (int,)
def unichr(s):
return u(chr(s))
long_type = integer_types[-1]
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| tests | Folder | 0755 |
|
|
| __init__.py | File | 23.17 KB | 0644 |
|
| _speedups.cpython-37m-x86_64-linux-gnu.so | File | 56.88 KB | 0755 |
|
| compat.py | File | 931 B | 0644 |
|
| decoder.py | File | 14.24 KB | 0644 |
|
| encoder.py | File | 26.67 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.9 KB | 0644 |
|
| tool.py | File | 1.11 KB | 0644 |
|