rewrite everything in final.pl to python2perl.pl