Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Python 3 compatibility #44

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michaelcdevin
Copy link

@michaelcdevin michaelcdevin commented Jul 26, 2021

I am working on a project with @ryancoe where we want to use Bemio, but we are using Python 3 as a base, while Bemio still requires Python 2. This addition allows Bemio to work with Python version >=3.3 while still being compatible with Python 2.

The majority of the additions were automated using the Python 2to3 package and are rudimentary syntax changes (e.g. print '...' -> print('...')). There are also two minor corrections in data_structures/wave_excitation.py and io/nemoh.py discovered while running the case tests.

python install_test.py all was successfully run for both Python 2.7 and 3.9, but let me know if any other compatibility issues are discovered.

Most of the run.py files for the tutorials encountered a TabError following the Python 3 compatibility change. This fixes this error (mostly changes TAB+space to just TAB). There were also some minor errors with a few of the case tests due to using floats where there should be integers, which are fixed here as well.
@salhus salhus requested a review from kmruehl July 28, 2021 14:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant