How to select animation channels using Python?
ActionGroup.select



As an example set the "spine" group to selected / unselected from the python console.

&gt;&gt;&gt; C.object.animation_data.action.groups['spine'].select = True