Fix Python3 support

This commit is contained in:
Friedrich Lindenberg 2014-02-18 13:03:19 +01:00
parent 6ef4cd7814
commit 5e90421e2d

View File

@ -6,6 +6,15 @@ try:
except ImportError: except ImportError:
from ordereddict import OrderedDict from ordereddict import OrderedDict
try:
unicode = unicode
except NameError:
# 'unicode' is undefined, must be Python 3
basestring = (str,bytes)
else:
# 'unicode' exists, must be Python 2
basestring = basestring
from sqlalchemy import Integer, UnicodeText, Float, DateTime, Boolean, types, Table, event from sqlalchemy import Integer, UnicodeText, Float, DateTime, Boolean, types, Table, event