Python3 support

I use 2to3 tool to convert origin file to python3 support,and test Ok in  python3.4 and pypy3