Opening a path with script

Maybe I’m not looking at the right place but I can’t seem to find what I’m looking for in the docs:

Is there a way to open a path via scripting, like I would do manually by doing option-delete on a node or a segment?

EDIT: whoops, found it. If someone else find this looking for the answer, its setClosePath

Follow up: setClosePath opens the path from its first node. I can’t use it again to split my opened path into two paths at another node, since I can’t set a starting point anymore.
So the question is: how would you proceed to split an opened path in two at a node’s position?

There is a layer.dividePathAtNode_(node) method.

You can try to poke around with print(" ".join(dir(Layer))). That gives you all methods that you can call on an object. There is a script form mekkablue that does that with a UI. Don’t remember what its called, right now.

Thanks Georg! I use dir() all the time, but I missed this one :zipper_mouth_face: as I was mostly looking at methods to a path object. This seems to do what I want, thanks!

It’s App > Method Reporter in the mekkablue scripts.