Control selection state of extra nodes

Hello, I would like to control the selection state of extra nodes (or handles, as I found out they’re called). Is this possible? I tried handle.selected, but this doesn’t exist. Looking through the available methods, I can’t find one that would allow me to control the selection state.

A related question: How do I iterate over the extra nodes in a layer?
print(Layer.extraHandles()) doesn’t return anything.

What extra nodes/handles do you mean?

The intersections of paths, the grey dots you can click on. When I select one and run print(Layer.selection[0]), a GSHandle is returned.

Those are extra nodes. They do not belong to the layer, as they depend on the tool that is currently active.

Is there any way of setting their selection state?

What are you trying to do? The extra nodes are stored in the selection tool I would need to refactor that a but to improve script access.

I am reading coordinates from fontbakery checks and want to highlight the nodes in question. This works fine for regular nodes, but since fontbakery also reports nodes at intersections, I would like to highlight these as well, if possible.

I have since decided to just write a reporter to highlight nodes instead, this will somewhat circumvent the issue.