Making a selection set

How would I go about making a ‘selection set’. I want to be able to quickly select a group of bones so I can transform them together.
In XSI (and Maya) I could copy the relevant text in the script editor and create a button which when pressed would run the script and select my objects/bones.
Is it possible to do something similar from the script in the ‘report’ window?