Closed devosb closed 5 years ago
I came to a similar conclusion. For me, the code attempts to import the 'StringIO' module which was deprecated in Python3. Would love to use this tool but need Python 3
I just got
pyfontaine
Traceback (most recent call last):
File "/usr/local/bin/pyfontaine", line 25, in <module>
from fontaine.cmap import library
File "/usr/local/lib/python3.7/site-packages/fontaine/cmap.py", line 56
except (ImportError, AttributeError), ex:
^
SyntaxError: invalid syntax
@felipesanches please could you take a look at this as a "p0" as I need this tool right now to do my work, and that it isn't working is super frustrating :)
sure!
I'll try to fix this tomorrow asap.
I am now working on a port to python 3. I think it will not take much time, while also not being super trivial. But I think it is worth the effort.
And there's also a pretty good outcome of porting it to python 3: using it as a dependency of fontbakery to chart glyph coverage of several glyph sets on the font families being checked.
The reason for the several commits in this issue is that I am amending and pushing my single-commit for the port to python 3 and observing the build logs on Travis.
Even though we lack a test suite in this project, I configured Travis to run all of the usage examples from our README and ensurer none of them crash.
@davelab6, @devosb, @achmurzy: Now the code from git master should be python 3 compatible. Please let me know if you see something that does not work.
I ran
pyfontaine U+0041 CharisSIL-R.ttf
and the result waswhile using Python 3 on Ubuntu Bionic amd64
If I use python 2
then I get the expected output of
The difference was Python 2 versus 3. Am I missing something to get pyfontaine to run under Python 3?