You might want to try future statements. Basically, keep the code the way it is, and backport features to 2.7. I already see the print
statements causing problems, so at the top just add from __future__ import print_statement
. This will cause Python 2.7 to read print
as if it were running in 3.x. Running the code through trial and error, backporting features as needed might be the best way to accomplish your goal. I will be happy to help with any further problems.
4
solved Need Help converting to python 2.7