Convert sage code from v8.1 to work in v9.1
Hi all,
I have a .sage file that works with Sage v8.1, however, it does not run with Sage v9.1. It seems the issues are the same issues that occur with Python2 vs Python3 syntax i.e. print statement syntax is print 'statement' vs print('statement')
Rather than go through line by line and find each difference, is there a way to convert the file to make it run for Sage 9.0 and later?
Any assistance would be appreciated!
Some useful tools are flycheck, pyflakes, flake8, pycodestyle : they allow to find the places needing care.
See also https://wiki.sagemath.org/Python3-Switch and its sub-pages
And there is no fully automatic way.
And all these tools are for
.py
files, of course.So far I've always ported code by hand but if your .sage file is public or if you email it to me I can try some of the tools on it.