sync convert.py, fix PEP8