expanded _Bas.c to allow more calls from python.