def POST(self): content = xutils.get_argument("content") result = xutils.exec_python_code("<shell>", content) return dict(code="success", message="", data=result)
def test_exec_code(self): code = "print(123)" xutils.exec_python_code(name='test', code=code, record_stdout=False, raise_err=True)