First implementation of python interface.