Interim commit of Python implementation.  More to go, but looking good so far.