initial commit for porting for python 3.2 and 3.3, the bytearray still needs to be fixed