Example #1
0
 def post(self):
     try:
         events = recordexec.recordexec(self.request.get("source"))
         result = {"type": "success", "events": events}
     except recordexec.CompilationError, e:
         # http://docs.python.org/library/exceptions.html#exceptions.SyntaxError
         result = {"type": "error", "msg": e.err.msg, "lineno": e.err.lineno}
Example #2
0
		def render_POST(self, request):
				try:
						events = recordexec.recordexec(request.args["source"][0])
						result = {
								'type': 'success',
								'events': events
						}
				except recordexec.CompilationError, e:
						result = {
						'type': 'error',
						'msg': e.err.msg,
						'lineno': e.err.lineno
						}