Source

pyptug / webpy / debug / de3.py

Full commit
import web
import sys

urls = (
    "/", "hello",
)
app = web.application(urls, globals())


def nointernalerror():
    raise sys.exc_info()

app.internalerror = nointernalerror


class hello:
    def GET(self):
        x = y + 1  # raise error
        return "hello word"

if __name__ == "__main__":
    from werkzeug.debug import DebuggedApplication
    app = DebuggedApplication(app.wsgifunc(), evalex=True)
    web.httpserver.runsimple(app)