python interpreter as shared pointer