INNER CODE UNIT · Python
dot_pythexec
probcomp/bayeslite · shell/src/core.py:354
def dot_pythexec(self, line):
'''execute a Python statement
<statement>
Execute a Python statement in the underlying Python
interpreter.
`bdb' is bound to the BayesDB instance.
'''
try:
self._python_globals['bdb'] = self._bdb
exec line in self._python_globals
except Exception:
self.stdout.write(traceback.format_exc())
return False
def dot_python(self, line):
'''evaluate a Python expression