Some mostly unrelated python code.