How to add a Bézier curve Use python script in glyphs

How to add a Bézier curve Use python script in glyphs

You do it similarly as described here: Hello, can I draw a line segment by giving it the starting and ending coordinates through a Python script - #8 by SCarewe
That was only adding line segments. To add curves, you add two off curve nodes and a curve node:

path = GSPath()
path.nodes.append(GSNode((10, 10), LINE))
path.nodes.append(GSNode((100, 10), LINE))
path.nodes.append(GSNode((100, 60), OFFCURVE))
path.nodes.append(GSNode((60, 100), OFFCURVE))
path.nodes.append(GSNode((10, 100), CURVE))
path.closed = True
Layer.shapes.append(path)

thanks very much