First cut at the python driver (UNTESTED)