Fix Python 3 compatibility issues

This commit is contained in:
Roy Hyunjin Han 2015-02-19 22:46:09 -05:00
commit 23844f9e76
2 changed files with 28 additions and 11 deletions

13
socketIO_client/compat.py Normal file
View file

@ -0,0 +1,13 @@
import six
def get_byte(x, index):
return six.indexbytes(x, index)
def get_character(x, index):
return chr(six.indexbytes(x, index))
def get_unicode(x):
return x.decode('utf-8')