further work on the KUPython class