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