python 3.2/3.3 compatibility

add python 3 support. Tested on python 3.3/3.2 with all transports.