#TIL the direction of a pcbnew (KiCAD) selection changes its behaviour. LtoR only selects completely surrounded parts, RtoL selects partially selected parts.
I can’t find this feature documented anywhere, but the selection colours are different so I assume it’s supposed to be like this.
EDIT: apparently it’s something of a de-facto UI standard in CAD apps, probably started by AutoCAD.
It just took me about 30 mins to figure it out, so here’s how to install python plugins in KiCad 5.0 on a Mac.
KICAD_SCRIPTING_flags are set to ON.
import pcbnew; print pcbnew.PLUGIN_DIRECTORIES_SEARCHand you’ll see a list of folders which pcbnew will search for plugins