add subliminal for subtitle download. #253

This commit is contained in:
clinton-hall 2014-06-27 17:04:44 +09:30
parent 47289c903a
commit c3889c01b1
149 changed files with 34173 additions and 33 deletions

22
libs/pysrt/compat.py Normal file
View file

@ -0,0 +1,22 @@
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:
basestring = basestring
str = unicode
open = io_open
elif is_py3:
basestring = (str, bytes)
str = str
open = open