python port of /thefryscorer/schemer