4 <link rel=
"stylesheet" href=
"/static/codemirror.css">
5 <link rel=
"stylesheet" href=
"/static/default.css">
6 <link rel=
"stylesheet" href=
"/static/codepad.css">
9 <h1><img id=
"logo" title=
"AE" src=
"/static/appengine_lowres.png"> codepad
</h1>
10 <form action=
"/{{ pad.key.id }}" method=
"POST">
11 <pre id=
"source">from google.appengine.ext import webapp
13 class MainHandler(webapp.RequestHandler):
15 <textarea name=
"code" cols=
"80" id=
"code">{{ pad.code|default:
"self.response.out.write('Hello world!')" }}
</textarea>
17 application = webapp.WSGIApplication([('/', MainHandler)])
20 util.run_wsgi_app(application)
22 if __name__ == '__main__':
23 <input type=
"submit" value=
"main()"> # or jump to
<a href=
"/{{ pad.parent_pad.key.id }}">parent
</a></pre>
26 <iframe src=
"{{ pad.key.id }}/eval" id=
"eval">
29 <script src=
"static/codemirror.js"></script>
31 var code
= document
.getElementById("code");
32 var eval
= document
.getElementById("eval");
33 var myCodeMirror
= CodeMirror
.fromTextArea(code
, {mode
: "python", lineNumbers
: true});