I am running Python 3.10.7 that’s installed through homebrew. But, somehow, it won’t recognize
f1 = Glyphs.fonts
which prints an error:
Traceback (most recent call last): File "<internal>", line 4 File "GlyphsApp/GlyphsApp/__init__.py", line 642 AttributeError: Cannot replace selector 'font' in 'GSApplication' by non-selector Traceback (most recent call last): File "<macro panel>", line 19 NameError: name 'Glyphs' is not defined
I remember that Glyphs is somehow imported automatically without an explicit
import Glyphs at the top. I am curious, how do I add
site-packages in my interpreter and install it? or alternatively, where is it located so that I can
sys.path.append the path?
Btw, which python on my terminal session returns:
>> which python /Users/neil/.pyenv/shims/python
I am using pyenv to manage my python versions. I’d appreciate some help on finding
Glyphs.__init__.py location on macOS. I tried searching around in
Glyphs.app/Content/Resources with no luck.
The other thing I tried is to install
python plugin from Plugins manager which installs
3.9.1 (Glyphs) version. I selected it, restarted Glyphs and it would somehow automatically import
Glyphs, that works fine. But, I want to install other libraries in that
3.9.1 interpreter, particularly
boto3 to interact with AWS.
So, to summarize, I have the following questions:
What is the magic behind the scenes that imports Glyphs library? Where is it located in the system so that I can manually import it?
Where is the
3.9.1 (Glyphs)interpreter located so that I can install my own libraries in that interpreter?
Either 1 or 2 would work, but I would prefer to understand the magic. Much prefer explicitness over implicitness