mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Move common libs to libs/common
This commit is contained in:
parent
8dbb1a2451
commit
1f4bd41bcc
1612 changed files with 962 additions and 10 deletions
22
libs/common/pysrt/compat.py
Normal file
22
libs/common/pysrt/compat.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue