Update Standalone MAPL Python to work with Python 2 and 3 #775
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates 3 of the Python scripts in MAPL to work with Python 2 and 3 using
2to3
as well as hints from:http://python-future.org/compatible_idioms.html
I was able to test both:
base/mapl_tree.py
base/mapl_vlist.py
and tree was zero diff, and vlist was...actually more accurate in Python 3. But the Python 2 output was not changed.
As for
Apps/MAPL_GridCompSpecs_ACG.py
, I wasn't sure how to test it, but the change2to3
made was slight and I can't see how it could fail.NOTE: This PR does not change the scripts in
Python/MAPL
as I'm not too sure how to test those.Related Issue
Motivation and Context
Transition from Python 2 to 3 is needed soon.
How Has This Been Tested?
I ran each of the scripts to make sure it worked (save the ACG one which I can't imagine won't)
I also ran a 1-day c24 run of GEOS with MAPL
develop
versus this branch. It built and was zero-diff.Types of changes
Checklist: