~ellimistd/pyquiz/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
(dp1
S'output'
p2
S''
sS'layer'
p3
S'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'
p4
sS'code'
p5
S'# -*- coding: utf-8 -*- \n\n#########################################################################\n## This is a samples controller\n## - index is the default action of any application\n## - user is required for authentication and authorization\n## - download is for downloading files uploaded in the db (does streaming)\n## - call exposes all registered services (none by default)\n#########################################################################  \n\ndef index():\n\treturn dict()\n\n@auth.requires_permission(\'create\', \'quiz\')\ndef new():\n\tform = SQLFORM(db.quiz,col3={\n\t\'public_doctests\':PRE("Should be in this format, remembering to have a space between the >>> and the prompt: \\n>>> hello_world()\\nHello World!"),\n\t\'starter\':\'Code here will be given to the student to start with\',\n\t\'times_takeable\':\'Enter 0 here for unlimited tries - eg, for a practice quiz.\',\n\t})\n\tif form.accepts(request.vars,session):\n\t\t\n\t\tquiz_id = form.vars.id\n\t\t\n\t\tgroup_id = auth.user_group(auth.user_id)\n\t\tauth.add_permission(group_id, \'update\', db.quiz,quiz_id)\n\t\t\n\t\tresponse.flash = \'quiz accepted\'\n\t\tredirect(URL(r=request, f=\'index\'))\n\t\t\n\treturn dict(form=form)\n\n@auth.requires_login()\t\ndef userinfo():\n\tgroup_id = auth.id_group(auth.user_id)\n\tdb(db.auth_membership.group_id==group_id)\n\t\n@auth.requires_permission(\'update\', \'quiz\', request.args(0))\ndef edit():\n\tquiz = db(db.quiz.id==request.args(0)).select()[0]\n\tform = SQLFORM(db.quiz, quiz, quizcol3={\n\t\'public_doctests\':PRE("Should be in this format, remembering to have a space between the >>> and the prompt: \\n>>> hello_world()\\nHello World!"),\n\t\'starter\':\'Code here will be given to the student to start with\',\n\t\'times_takeable\':\'Enter 0 here for unlimited tries - eg, for a practice quiz.\',\n\t})\n\tif form.accepts(request.vars,session):\n\t\tresponse.flash = "Edit accepted"\n\t\tredirect(URL(r=request,f=\'index\'))\n\treturn dict(form=form,quiz=quiz)\t\n\t\n@auth.requires_permission(\'read\', \'attempt\', request.args(0))\ndef attempt():\n\tattempt = db(db.attempt.id==request.args(0)).select()[0]\n\tif auth.has_membership(user_id=auth.user_id,role=\'teachers\'):\n\t\treturn dict(attempt=attempt,teacher=True)\n\treturn dict(attempt=attempt,teacher=False)\n\t\ndef list():\n\tquizzes = db().select(db.quiz.ALL)\n\tif auth.has_membership(user_id=auth.user_id,role=\'teachers\'):\n\t\treturn dict(quizzes=quizzes, teacher=\'yes\')\n\telse:\n\t\treturn dict(quizzes=quizzes, teacher=\'no\')\n\t\n\n@auth.requires_login()\t\ndef take():\n\tquiz = db(db.quiz.id==request.args(0)).select()[0]\n\t\n\tattempts=[]\n\tif quiz.times_takeable != 0:\n\t\tuserid=auth.user_id\n\t\tfor attempt in db(db.attempt.user==userid).select():\n\t\t\tif int(attempt.quiz)==quiz.id:\n\t\t\t\tattempts.append(attempt)\n\t\ttakes_left=str(quiz.times_takeable - len(attempts))\n\t\tif len(attempts) >= quiz.times_takeable:\n\t\t\treturn dict(error="already_taken")\n\telse:\n\t\ttakes_left="infinite"\n\tform = SQLFORM(db.quiz, quiz, fields=["starter"],col3={\'starter\':PRE(attempts[-1].code)})\n\telse:\n\t\tform = SQLFORM(db.quiz, quiz, fields=["starter"])\n\tresults = ""\n\tif request.vars.starter:\n\t\tcode = request.vars.starter\n\t\timport applications.pyquiz.modules.pypy.pypy.translator.sandbox.pypy_interact as pypy_interact\n\t\topentests = open("applications/pyquiz/modules/pypy/pypy/translator/sandbox/virtualtmp/opentests.py","w")\n\t\topentests.write("\'\'\'\\n"+quiz.public_doctests+"\\n\'\'\'\\n"+code)\n\t\topentests.close()\n\t\thiddentests = open("applications/pyquiz/modules/pypy/pypy/translator/sandbox/virtualtmp/hiddentests.py","w")\n\t\thiddentests.write("\'\'\'\\n"+quiz.hidden_doctests+"\\n\'\'\'\\n"+code)\n\t\thiddentests.close()\n\t\tsandbox = pypy_interact.PyPySandboxedProc(\n\t\t\t\'applications/pyquiz/modules/pypy/pypy/translator/sandbox/sandbox\',\n\t\t\t["/tmp/codefile.py",],\n\t\t\t\'applications/pyquiz/modules/pypy/pypy/translator/sandbox/virtualtmp/\')\n\t\tresults = sandbox.communicate()[1]\n\t\t\n\t\t\n\t\tquasichunklist = results.split("----------------------------------------------------------------------")\n\t\tchunklist = []\n\t\tfor item in quasichunklist:\n\t\t\tchunklist+=(item.split("======================================================================"))\n\t\t\n\t\tchunklist = chunklist[1:-1]\n\t\tfor item in chunklist:\n\t\t\tif item == \'\\nTraceback (most recent call last):\\n  File "/bin/lib-python/modified-2.5.2/doctest.py", line 2128, in runTest\\n    raise self.failureException(self.format_failure(new.getvalue()))\\nAssertionError: Failed doctest test for opentests\\n  File "/tmp/opentests.py", line 0, in opentests\\n\\n\':\n\t\t\t\tchunklist.remove(item)\n\t\t\telif item == \'\\nTraceback (most recent call last):\\n  File "/bin/lib-python/modified-2.5.2/doctest.py", line 2128, in runTest\\n    raise self.failureException(self.format_failure(new.getvalue()))\\nAssertionError: Failed doctest test for hiddentests\\n  File "/tmp/hiddentests.py", line 0, in hiddentests\\n\\n\':\n\t\t\t\tchunklist.remove(item)\n\t\t\telif item.startswith(\'FAIL: Doctest:\'):\n\t\t\t\tchunklist.remove(item)\n\t\t\t\t\n\t\tfullresults = ""\n\t\tfor item in chunklist:\n\t\t\tfullresults+=item\n\t\t\t\n\t\t\n\t\ttry:\t\n\t\t\tdoctest_results = fullresults.split("FAIL: Doctest: hiddentests")[0][74:]\n\t\t\thidden_results = fullresults.split("FAIL: Doctest: hiddentests")[1][53:]\n\t\texcept IndexError:\n\t\t\thidden_results = "No hidden failures"\n\t\t\t\n\t\tif not \':\' in doctest_results:\n\t\t\tif not \':\' in hidden_results:\n\t\t\t\tdoctest_results = "No failed doctests, you passed the quiz!"\n\t\t\telse:\n\t\t\t\tdoctest_results = "Unspecified failure - are you actually making a generalized solution?"\n\t\t\t\n\t\tif takes_left != 0:\n\t\t\tsession.lastquiz=request.args[0]\n\t\t\tsession.lastcode=code\n\t\t\tsession.lastresults=doctest_results\n\t\t\n\t\tnewattempt = db.attempt.insert(\n\t\t\tquiz=request.args(0),\n\t\t\tuser=auth.user_id,\n\t\t\tcode=code,\n\t\t\tdoctest_results=doctest_results,\n\t\t\thidden_results=hidden_results)\n\t\t\t\n\t\tgroup_id = auth.user_group(auth.user_id)\n\t\tauth.add_permission(group_id, \'read\', db.attempt,newattempt)\n\t\tredirect(URL(r=request,f=\'attempt\',args=[newattempt]))\n\t\t\n\treturn dict(form=form,quiz=quiz,attempts=attempts,takes_left=takes_left,error="none")\n\t\n@auth.requires_login()\t\ndef history():\n\tif not request.args:\n\t\tattempts = db(db.attempt.user==auth.user_id).select()\n\t\tquizzes = []\n\t\tfor attempt in attempts:\n\t\t\tquiz = (db(db.quiz.id==attempt.quiz).select()[0])\n\t\t\tif not quiz in quizzes:\n\t\t\t\tquizzes.append(quiz)\n\t\treturn dict(quizzes=quizzes,action="quizzes")\n\telif request.args[0]=="quiz":\n\t\tattempts = db(db.attempt.user==auth.user_id).select()\n\t\toutattempts=[]\n\t\tfor attempt in attempts:\n\t\t\tif int(attempt.quiz) == int(request.args[1]):\n\t\t\t\toutattempts.append(attempt)\n\t\treturn dict(attempts=outattempts,action="attempts")\n\n@auth.requires_permission(\'read\', \'attempt\', 0)\t\ndef all_attempts():\n\tif not request.args:\n\t\tusers = db().select(db.auth_user.ALL)\n\t\treturn dict(users=users,action="users")\n\telif len(request.args)==1:\n\t\tuser = db(db.auth_user.id==int(request.args[0])).select()[0]\n\t\toutquizzes=[]\n\t\tfor attempt in db().select(db.attempt.ALL):\n\t\t\tif int(attempt.user.id) == int(user.id):\n\t\t\t\tif not attempt.quiz in outquizzes:\n\t\t\t\t\toutquizzes.append(attempt.quiz)\n\t\treturn dict(quizzes=outquizzes,user=user,action="user")\n\telif len(request.args)==2:\n\t\tuser = db(db.auth_user.id==int(request.args[0])).select()[0]\n\t\tquiz = db(db.quiz.id==int(request.args[1])).select()[0]\n\t\toutattempts=[]\n\t\tfor attempt in db().select(db.attempt.ALL):\n\t\t\tif attempt.user.id == user.id:\n\t\t\t\tif attempt.quiz.id==quiz.id:\n\t\t\t\t\toutattempts.append(attempt)\n\t\treturn dict(attempts=outattempts,user=user,quiz=quiz,action="quiz")\n\t\t\n@auth.requires_permission(\'read\', \'attempt\', 0)\t\ndef user_admin():\n\tif not request.args:\n\t\tusers = db().select(db.auth_user.ALL)\n\t\tteachers = []\n\t\tstudents = []\n\t\tfor user in users:\n\t\t\tif auth.has_membership(user_id=user.id,role=\'teachers\'):\n\t\t\t\tteachers.append(user)\n\t\t\telse: \n\t\t\t\tstudents.append(user)\n\t\treturn dict(teachers=teachers,students=students)\n\t\t\t\n\t\t\n\t\t\n@auth.requires_membership(\'teachers\')\ndef make_teacher():\t\n\ttry:\n\t\tuser = db(db.auth_user.id==int(request.args[0])).select()[0]\n\texcept:\n\t\treturn dict(user="none",message=\'Error: Invalid user\')\n\tauth.add_membership(1,user.id)\n\treturn dict(user=user,message=\'was added to teachers\')\n\t\n@auth.requires_membership(\'teachers\')\ndef remove_teacher():\t\n\ttry:\n\t\tuser = db(db.auth_user.id==int(request.args[0])).select()[0]\n\texcept:\n\t\treturn dict(user="none",message=\'Error: Invalid user\')\n\tauth.del_membership(1,user.id)\n\treturn dict(user=user,message=\'was removed from teachers\')\n\n\ndef user():\n\t"""\n\texposes:\n\thttp://..../[app]/default/user/login \n\thttp://..../[app]/default/user/logout\n\thttp://..../[app]/default/user/register\n\thttp://..../[app]/default/user/profile\n\thttp://..../[app]/default/user/retrieve_password\n\thttp://..../[app]/default/user/change_password\n\tuse @auth.requires_login()\n\t\t@auth.requires_membership(\'group name\')\n\t\t@auth.requires_permission(\'read\',\'table name\',record_id)\n\tto decorate functions that need access control\n\t"""\n\treturn dict(form=auth())\n\n\ndef download():\n\treturn response.download(request,db)\n\n\n\n\n\nresponse._vars=response._caller(list)\n'
p6
sS'snapshot'
p7
(dp8
S'exception'
p9
(dp10
S'__getslice__'
p11
S"<method-wrapper '__getslice__' of exceptions.SyntaxError object>"
p12
sS'text'
p13
S"'\\telse:\\n'"
p14
sS'__str__'
p15
S"<method-wrapper '__str__' of exceptions.SyntaxError object>"
p16
sS'__reduce__'
p17
S'<built-in method __reduce__ of exceptions.SyntaxError object>'
p18
sS'__dict__'
p19
S'{}'
p20
sS'__sizeof__'
p21
S'<built-in method __sizeof__ of exceptions.SyntaxError object>'
p22
sS'__init__'
p23
S"<method-wrapper '__init__' of exceptions.SyntaxError object>"
p24
sS'__setattr__'
p25
S"<method-wrapper '__setattr__' of exceptions.SyntaxError object>"
p26
sS'__reduce_ex__'
p27
S'<built-in method __reduce_ex__ of exceptions.SyntaxError object>'
p28
sS'__new__'
p29
S'<built-in method __new__ of type object>'
p30
sS'__format__'
p31
S'<built-in method __format__ of exceptions.SyntaxError object>'
p32
sS'__class__'
p33
S"<type 'exceptions.SyntaxError'>"
p34
sS'filename'
p35
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
p36
sS'lineno'
p37
S'82'
p38
sS'msg'
p39
S"'invalid syntax'"
p40
sS'__doc__'
p41
S"'Invalid syntax.'"
p42
sS'__getitem__'
p43
S"<method-wrapper '__getitem__' of exceptions.SyntaxError object>"
p44
sS'__setstate__'
p45
S'<built-in method __setstate__ of exceptions.SyntaxError object>'
p46
sS'__getattribute__'
p47
S"<method-wrapper '__getattribute__' of exceptions.SyntaxError object>"
p48
sS'print_file_and_line'
p49
S'None'
p50
sS'args'
p51
S"('invalid syntax', ('/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py', 82, 5, '\\telse:\\n'))"
p52
sS'__subclasshook__'
p53
S'<built-in method __subclasshook__ of type object>'
p54
sS'offset'
p55
S'5'
sS'__unicode__'
p56
S'<built-in method __unicode__ of exceptions.SyntaxError object>'
p57
sS'__delattr__'
p58
S"<method-wrapper '__delattr__' of exceptions.SyntaxError object>"
p59
sS'__repr__'
p60
S"<method-wrapper '__repr__' of exceptions.SyntaxError object>"
p61
sS'__hash__'
p62
S"<method-wrapper '__hash__' of exceptions.SyntaxError object>"
p63
ssS'evalue'
p64
S'invalid syntax (default.py, line 82)'
p65
sS'request'
p66
(dp67
S'function'
p68
S"'list'"
p69
sS'body'
p70
S'<cStringIO.StringO object>'
p71
sS'wsgi'
p72
S"<Storage {'start_response': <function <lambda> a...ING': 'gzip,deflate', 'HTTP_KEEP_ALIVE': '115'}}>"
p73
sS'extension'
p74
S"'html'"
p75
sS'vars'
p76
S'<Storage {}>'
p77
sS'cid'
p78
S'None'
p79
sS'url'
p80
S"'/pyquiz/default/list'"
p81
sg51
S'[]'
p82
sS'controller'
p83
S"'default'"
p84
sS'cookies'
p85
S"<SimpleCookie: session_id_admin='127-0-0-1-0f79e...'127-0-0-1-b72b09cd-4df5-400b-a52a-de767af812c8'>"
p86
sS'application'
p87
S"'pyquiz'"
p88
sS'ajax'
p89
S'False'
p90
sS'client'
p91
S"'127.0.0.1'"
p92
sS'env'
p93
S"<Storage {'http_user_agent': 'Mozilla/5.0 (X11; ...ce': False, 'path_info': '/pyquiz/default/list'}>"
p94
sS'raw_args'
p95
S'None'
p96
sS'get_vars'
p97
S'<Storage {}>'
p98
sS'folder'
p99
S"'/home/dreich/lib/python/web2py/applications/pyquiz/'"
p100
sS'now'
p101
S'datetime.datetime(2010, 8, 13, 13, 38, 36, 102389)'
p102
sS'post_vars'
p103
S'<Storage {}>'
p104
ssS'frames'
p105
(lp106
(dp107
S'file'
p108
S'/home/dreich/lib/python/web2py/gluon/restricted.py'
p109
sS'dump'
p110
(dp111
S'code'
p112
S"'# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n'"
p113
sS'layer'
p114
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
p115
sS'global compile2'
p116
S'<function compile2>'
p117
sS'ccode'
p118
S'undefined'
p119
ssS'lnum'
p120
I184
sS'lines'
p121
(dp122
I179
S''
sI180
S'    try:'
p123
sI181
S'        if type(code) == types.CodeType:'
p124
sI182
S'            ccode = code'
p125
sI183
S'        else:'
p126
sI184
S'            ccode = compile2(code,layer)'
p127
sI185
S''
sI186
S'        exec ccode in environment'
p128
sI187
S'    except HTTP:'
p129
sI188
S'        raise'
p130
ssS'call'
p131
S"(code='# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n', environment={'A': <class 'gluon.html.A'>, 'Auth': <class 'gluon.tools.Auth'>, 'B': <class 'gluon.html.B'>, 'BEAUTIFY': <class 'gluon.html.BEAUTIFY'>, 'BODY': <class 'gluon.html.BODY'>, 'BR': <class 'gluon.html.BR'>, 'CENTER': <class 'gluon.html.CENTER'>, 'CLEANUP': <class 'gluon.validators.CLEANUP'>, 'CODE': <class 'gluon.html.CODE'>, 'CRYPT': <class 'gluon.validators.CRYPT'>, ...}, layer='/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py')"
p132
sS'func'
p133
S'restricted'
p134
sa(dp135
g108
S'/home/dreich/lib/python/web2py/gluon/restricted.py'
p136
sg110
(dp137
S'builtincompile'
p138
S'<built-in function compile>'
p139
sS'code'
p140
S"'# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n'"
p141
sS'code.rstrip'
p142
S'<built-in method rstrip of str object>'
p143
sS').replace'
p144
g119
sS'layer'
p145
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
p146
ssg120
I171
sg121
(dp147
I166
S''
sI167
S'def compile2(code,layer):'
p148
sI168
S'    """'
p149
sI169
S"    The +'\\n' is necessary else compile fails when code ends in a comment."
p150
sI170
S'    """'
p151
sI171
S"    return compile(code.rstrip().replace('\\r\\n','\\n')+'\\n', layer, 'exec')"
p152
sI172
S''
sI173
S"def restricted(code, environment={}, layer='Unknown'):"
p153
sI174
S'    """'
p154
sI175
S'    runs code in environment and returns the output. if an exception occurs'
p155
ssg131
S"(code='# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n', layer='/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py')"
p156
sg133
S'compile2'
p157
sasS'pyver'
p158
S'Python 2.6.5: /usr/bin/python'
p159
sS'session'
p160
(dp161
S'lastresults'
p162
S"'No failed doctests, you passed the quiz!'"
p163
sS'lastquiz'
p164
S"'30'"
p165
sS'flash'
p166
S'None'
p167
sS'auth'
p168
S"<Storage {'expiration': 3600, 'user': <Storage {..., 8, 13, 13, 38, 36, 102389), 'remember': False}>"
p169
sS'lastcode'
p170
S"'limit = 2'"
p171
sS'_formkey[login]'
p172
S"'76907923-c3df-48da-a12e-865e67ee396c'"
p173
sS'_formkey[quiz_create]'
p174
S"'cc03d533-0a60-42de-a336-a11af68f2e34'"
p175
ssS'etype'
p176
S"<type 'exceptions.SyntaxError'>"
p177
sS'date'
p178
S'Fri Aug 13 13:38:36 2010'
p179
sS'response'
p180
(dp181
S'status'
p182
S'200'
p183
sg70
S'<cStringIO.StringO object>'
p184
sg85
S"<SimpleCookie: session_id_pyquiz='127-0-0-1-551bff65-0c08-476c-a819-2b1685d3c115'>"
p185
sS'_vars'
p186
S'None'
p187
sS'title'
p188
S"'pyquiz'"
p189
sS'session_file'
p190
S"<open file '/home/dreich/lib/python/web2py/appli...51bff65-0c08-476c-a819-2b1685d3c115', mode 'rb+'>"
p191
sS'flash'
p192
S"''"
p193
sS'_custom_rollback'
p194
S'None'
p195
sS'session_id'
p196
S"'127-0-0-1-551bff65-0c08-476c-a819-2b1685d3c115'"
p197
sS'headers'
p198
S"<Storage {'Expires': 'Fri, 13 Aug 2010 17:38:36 ...he, must-revalidate, post-check=0, pre-check=0'}>"
p199
sS'meta'
p200
S'<Storage {}>'
p201
sS'session_filename'
p202
S"'/home/dreich/lib/python/web2py/applications/pyqu...ns/127-0-0-1-551bff65-0c08-476c-a819-2b1685d3c115'"
p203
sS'postprocessing'
p204
S'[]'
p205
sS'menu'
p206
S"[[<lazyT 'Home Page'>, False, '/pyquiz/default/index', []], [<lazyT 'New Quiz'>, False, '/pyquiz/default/new', []], [<lazyT 'List Quizzes'>, False, '/pyquiz/default/list', []], [<lazyT 'Your History'>, False, '/pyquiz/default/history', []], [<lazyT 'User Admin'>, False, '/pyquiz/default/user_admin', []]]"
p207
sS'_view_environment'
p208
S"{'A': <class 'gluon.html.A'>, 'Auth': <class 'gluon.tools.Auth'>, 'B': <class 'gluon.html.B'>, 'BEAUTIFY': <class 'gluon.html.BEAUTIFY'>, 'BODY': <class 'gluon.html.BODY'>, 'BR': <class 'gluon.html.BR'>, 'CENTER': <class 'gluon.html.CENTER'>, 'CLEANUP': <class 'gluon.validators.CLEANUP'>, 'CODE': <class 'gluon.html.CODE'>, 'CRYPT': <class 'gluon.validators.CRYPT'>, ...}"
p209
sS'subtitle'
p210
S"<lazyT 'Quizzes in Python'>"
p211
sS'session_id_name'
p212
S"'session_id_pyquiz'"
p213
sS'_custom_commit'
p214
S'None'
p215
sS'_caller'
p216
S'<function <lambda>>'
p217
sS'files'
p218
S'[]'
p219
sS'view'
p220
S"'default/list.html'"
p221
ssS'locals'
p222
(dp223
g3
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
p224
sg5
S"'# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n'"
p225
sssS'traceback'
p226
S'Traceback (most recent call last):\n  File "/home/dreich/lib/python/web2py/gluon/restricted.py", line 184, in restricted\n    ccode = compile2(code,layer)\n  File "/home/dreich/lib/python/web2py/gluon/restricted.py", line 171, in compile2\n    return compile(code.rstrip().replace(\'\\r\\n\',\'\\n\')+\'\\n\', layer, \'exec\')\n  File "/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py", line 82\n    else:\n       ^\nSyntaxError: invalid syntax\n'
p227
s.