def main(form):
instruction, state = get_form_state(form)
# print(instruction, state)
path = None
try:
path = tempfile.mkdtemp()
state, error = run_prog(instruction, state, path)
finally:
if path:
shutil.rmtree(path)
# print(error, state)
template = jinja2.Template(html_view_tmpl)
html = template.render(prog=instruction, error=error, **state)
return html
评论列表
文章目录