As Hin-Tak mentioned, it is possible and relatively easy to support both 2.7 and 3.x in the same code base. One library I used personally is future: http://python-future.org/quickstart.html
I'd write Python 3 code and use future to make it work on Py2. Haven't looked at your code so far, may weight in later. Also, I suggest using pytest and tox to test your code in both 2.7 and 3.6. Have a look at Python libraries like https://github.com/rougier/freetype-py. Pytest for writing unit tests, tox for running them in both versions. Look at coverage to test your unit test coverage of your code, as used in e.g. https://github.com/googlefonts/fontbakery/blob/master/tox.ini -- the generated HTML report is very useful to see what you got covered. I furthermore recommend looking at a code formatter like yapf (or, if you're feeling edgy, black on GitHub) and maybe even hook it into a format-on-save thing so you spend your brain cycles on more important things.
_______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
