initial batch of decent QueryAtom support for python;
Fixes #181