no, you can not.. but DrawBot exists also as a module where you can use your own python.
see https://github.com/typemytype/drawbot#using-drawbot-as-a-python-module
cool way to make a rounded rect!
there are already a roundedRect example in the repository: see https://github.com/typemytype/drawbot/blob/master/examples/roundedRect.py
I would encourage you to make a python package out of your helper tools that you import when you needed it...
# a separate file with the name "roundedRect.py"
def roundedRect(...):
# draw your stuff here
# an other file in the same directory
# name of the file/module name of the function
from roundedRect import roundedRect
# call it
roundedRect(...)
hope this makes sense!
I dont know glyhps but I would encourage you to use a BezierPath object instead see https://www.drawbot.com/content/shapes/bezierPath.html#drawBot.context.baseContext.BezierPath.translate