2to3使うんじゃないの
使ったことないけど
https://docs.python.org/ja/3/library/2to3.html