Update to make it work with python3. This translate was done by Dan Clewley, working to finish it off.
Further fixes for py6s. 2to3 now suggests no further changes to files.