smart-operator: merged modification from eamcs for python project.