python port of our CE cluster code