diff --git a/hexchat.py b/hexchat.py index 0bcc5c5..faa134b 100644 --- a/hexchat.py +++ b/hexchat.py @@ -6,6 +6,21 @@ import functools import types +#taken from: http://www.rfk.id.au/blog/entry/preparing-pyenchant-for-python-3/ +try: + unicode = unicode +except NameError: + # 'unicode' is undefined, must be Python 3 + str = str + unicode = str + bytes = bytes + basestring = (str,bytes) +else: + # 'unicode' exists, must be Python 2 + str = str + unicode = unicode + bytes = str + __version__ = (1, 0)