@jo Yes, right now I'm working like that,
but I would try to avoid this solution in particular,
since I consider it as not Pythonic and "proper"
Rafał Buchner
@RafalBuchner
https://twitter.com/RafalBuchner
https://www.instagram.com/rafalbuchner/
https://github.com/RafalBuchner/
Best posts made by RafalBuchner
Latest posts made by RafalBuchner
-
RE: Installing Packages
-
Installing Packages
I'm looking for a way to install site packages for a new DrawBot.
(I was trying to install for example PageBot or Letterror's coverage)When I was following the tutorial from PageBot's github (https://github.com/PageBot/PageBot/blob/master/INSTALL.md) It didn't work at all.
this code:
import site print('Found site at %s' % site.__file__) packages = site.getsitepackages() for p in packages: print(' - %s' % p)
throws error:
Found site at /Applications/DrawBot.app/Contents/Resources/site.pyc Traceback (most recent call last): File "<untitled>", line 4, in <module> AttributeError: module 'site' has no attribute 'getsitepackages'
even If I'm trying to change the name of the site.pyc (I'm tring to follow the PageBot tutorial)
import sys print(sys.path)
prints out
['/Users/--USER--NAME--', '/Applications/DrawBot.app/Contents/Resources/lib/python36.zip', '/Applications/DrawBot.app/Contents/Resources/lib/python3.6', '/Applications/DrawBot.app/Contents/Resources/lib/python3.6/lib-dynload', '/Applications/DrawBot.app/Contents/Resources/lib/python3.6/site-packages.zip', '/Applications/DrawBot.app/Contents/Resources/lib/python3.6/site-packages']
so it doesn't care about my python3 site-package folder (
/usr/local/lib/python3.6/site-packages/
) -
Drawing glyphs from ufo file.
how to draw glyph of a UFO file in DrawBot outside RoboFont?
So far I came up with this solution, but I don't know what to do next:from fontParts.world import * basepath = os.path.dirname(__file__) filepath = os.path.abspath(os.path.join(basepath, "..", "..", "UFOS/typeface-regular.ufo")) f = OpenFont(filepath) for g in f: newPage(1000,1000) p = g.getPen() # I don't know what should I put here
command
drawGlyph(g)
doesn't work, and I imagine, that it should work only inside of RoboFont.Thanks for the help in advance