mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-13 21:05:11 -05:00
8d9d62caf5
Fixed issue #52
25 lines
359 B
Python
25 lines
359 B
Python
|
|
import sys
|
|
|
|
# Syntax sugar.
|
|
_ver = sys.version_info
|
|
|
|
#: Python 2.x?
|
|
is_py2 = (_ver[0] == 2)
|
|
|
|
#: Python 3.x?
|
|
is_py3 = (_ver[0] == 3)
|
|
|
|
from io import open as io_open
|
|
|
|
if is_py2:
|
|
builtin_str = str
|
|
basestring = basestring
|
|
str = unicode
|
|
open = io_open
|
|
elif is_py3:
|
|
builtin_str = str
|
|
basestring = (str, bytes)
|
|
str = str
|
|
open = open
|