mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-29 19:15:56 +00:00
23 lines
484 B
Python
23 lines
484 B
Python
from __future__ import absolute_import, division, print_function
|
|
|
|
import sys
|
|
import codecs
|
|
|
|
|
|
PY3 = sys.version_info[0] == 3
|
|
PY2 = sys.version_info[0] == 2
|
|
|
|
|
|
if PY2:
|
|
bytes = str
|
|
text_type = unicode
|
|
string_types = basestring
|
|
range_type = xrange
|
|
iteritems = lambda x: x.iteritems()
|
|
# b = lambda x: x
|
|
else:
|
|
text_type = str
|
|
string_types = str,
|
|
range_type = range
|
|
iteritems = lambda x: iter(x.items())
|
|
# b = lambda x: codecs.latin_1_encode(x)[0]
|