Initial attempt at Python wrapper.