def execute():
    app = request.args[0]
    command = request.vars.statement
    session['debug_commands:' + app].append(command)
    try:
        output = web_debugger.do_exec(command)
        if output is None:
            output = ""
    except Exception, e:
        output = T("Exception %s") % str(e)
    k = len(session['debug_commands:' + app]) - 1
    return '[%i] %s%s\n' % (k + 1, command, output)
dataset/ETHPy150Open uwdata/termite-visualizations/web2py/applications/admin/controllers/debug.py/execute/original