> That python code is horrid.
Just out of curiosity, why do you find the code horrid? There are really only 9 lines of code that aren't glue code, and apart from the error prints (which are really irrelevant for these demonstration purposes), the code looks basically fine to me.
EDIT:
seen = []
for b in boards:
if set(seen).isdisjoint(orbit(b)):
seen.append(b)
Ah, well...EDIT 2: also, see comment below, it's not Python