MissionPlanner
MissionPlanner copied to clipboard
Scripts: Modernize Python 2 code to get ready for Python 3
print() is a function in Python 3.
% ruff check Scripts | grep SyntaxError
% uvx --python=3.12 --from=future futurize --stage1 --write <files with SyntaxErrors>
https://docs.astral.sh/ruff https://github.com/PythonCharmers/python-future
Do note that Mission Planner uses IronPython rather than CPython. Python 3 is still a very new thing for that AFAIK.
These are “safe” changes that should not break Py2 compatibility but of course that requires testing.