~ellimistd/pyquiz/trunk

« back to all changes in this revision

Viewing changes to errors/127.0.0.1.2010-08-13.13-38-36.5d401af3-9524-4aac-b867-04afcb4c794e

  • Committer: David Reich
  • Date: 2010-08-13 18:51:09 UTC
  • Revision ID: dreich@nevada-20100813185109-teief39mst3knnqp
Cowen's Bugs fixed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(dp1
 
2
S'output'
 
3
p2
 
4
S''
 
5
sS'layer'
 
6
p3
 
7
S'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'
 
8
p4
 
9
sS'code'
 
10
p5
 
11
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'
 
12
p6
 
13
sS'snapshot'
 
14
p7
 
15
(dp8
 
16
S'exception'
 
17
p9
 
18
(dp10
 
19
S'__getslice__'
 
20
p11
 
21
S"<method-wrapper '__getslice__' of exceptions.SyntaxError object>"
 
22
p12
 
23
sS'text'
 
24
p13
 
25
S"'\\telse:\\n'"
 
26
p14
 
27
sS'__str__'
 
28
p15
 
29
S"<method-wrapper '__str__' of exceptions.SyntaxError object>"
 
30
p16
 
31
sS'__reduce__'
 
32
p17
 
33
S'<built-in method __reduce__ of exceptions.SyntaxError object>'
 
34
p18
 
35
sS'__dict__'
 
36
p19
 
37
S'{}'
 
38
p20
 
39
sS'__sizeof__'
 
40
p21
 
41
S'<built-in method __sizeof__ of exceptions.SyntaxError object>'
 
42
p22
 
43
sS'__init__'
 
44
p23
 
45
S"<method-wrapper '__init__' of exceptions.SyntaxError object>"
 
46
p24
 
47
sS'__setattr__'
 
48
p25
 
49
S"<method-wrapper '__setattr__' of exceptions.SyntaxError object>"
 
50
p26
 
51
sS'__reduce_ex__'
 
52
p27
 
53
S'<built-in method __reduce_ex__ of exceptions.SyntaxError object>'
 
54
p28
 
55
sS'__new__'
 
56
p29
 
57
S'<built-in method __new__ of type object>'
 
58
p30
 
59
sS'__format__'
 
60
p31
 
61
S'<built-in method __format__ of exceptions.SyntaxError object>'
 
62
p32
 
63
sS'__class__'
 
64
p33
 
65
S"<type 'exceptions.SyntaxError'>"
 
66
p34
 
67
sS'filename'
 
68
p35
 
69
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
 
70
p36
 
71
sS'lineno'
 
72
p37
 
73
S'82'
 
74
p38
 
75
sS'msg'
 
76
p39
 
77
S"'invalid syntax'"
 
78
p40
 
79
sS'__doc__'
 
80
p41
 
81
S"'Invalid syntax.'"
 
82
p42
 
83
sS'__getitem__'
 
84
p43
 
85
S"<method-wrapper '__getitem__' of exceptions.SyntaxError object>"
 
86
p44
 
87
sS'__setstate__'
 
88
p45
 
89
S'<built-in method __setstate__ of exceptions.SyntaxError object>'
 
90
p46
 
91
sS'__getattribute__'
 
92
p47
 
93
S"<method-wrapper '__getattribute__' of exceptions.SyntaxError object>"
 
94
p48
 
95
sS'print_file_and_line'
 
96
p49
 
97
S'None'
 
98
p50
 
99
sS'args'
 
100
p51
 
101
S"('invalid syntax', ('/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py', 82, 5, '\\telse:\\n'))"
 
102
p52
 
103
sS'__subclasshook__'
 
104
p53
 
105
S'<built-in method __subclasshook__ of type object>'
 
106
p54
 
107
sS'offset'
 
108
p55
 
109
S'5'
 
110
sS'__unicode__'
 
111
p56
 
112
S'<built-in method __unicode__ of exceptions.SyntaxError object>'
 
113
p57
 
114
sS'__delattr__'
 
115
p58
 
116
S"<method-wrapper '__delattr__' of exceptions.SyntaxError object>"
 
117
p59
 
118
sS'__repr__'
 
119
p60
 
120
S"<method-wrapper '__repr__' of exceptions.SyntaxError object>"
 
121
p61
 
122
sS'__hash__'
 
123
p62
 
124
S"<method-wrapper '__hash__' of exceptions.SyntaxError object>"
 
125
p63
 
126
ssS'evalue'
 
127
p64
 
128
S'invalid syntax (default.py, line 82)'
 
129
p65
 
130
sS'request'
 
131
p66
 
132
(dp67
 
133
S'function'
 
134
p68
 
135
S"'list'"
 
136
p69
 
137
sS'body'
 
138
p70
 
139
S'<cStringIO.StringO object>'
 
140
p71
 
141
sS'wsgi'
 
142
p72
 
143
S"<Storage {'start_response': <function <lambda> a...ING': 'gzip,deflate', 'HTTP_KEEP_ALIVE': '115'}}>"
 
144
p73
 
145
sS'extension'
 
146
p74
 
147
S"'html'"
 
148
p75
 
149
sS'vars'
 
150
p76
 
151
S'<Storage {}>'
 
152
p77
 
153
sS'cid'
 
154
p78
 
155
S'None'
 
156
p79
 
157
sS'url'
 
158
p80
 
159
S"'/pyquiz/default/list'"
 
160
p81
 
161
sg51
 
162
S'[]'
 
163
p82
 
164
sS'controller'
 
165
p83
 
166
S"'default'"
 
167
p84
 
168
sS'cookies'
 
169
p85
 
170
S"<SimpleCookie: session_id_admin='127-0-0-1-0f79e...'127-0-0-1-b72b09cd-4df5-400b-a52a-de767af812c8'>"
 
171
p86
 
172
sS'application'
 
173
p87
 
174
S"'pyquiz'"
 
175
p88
 
176
sS'ajax'
 
177
p89
 
178
S'False'
 
179
p90
 
180
sS'client'
 
181
p91
 
182
S"'127.0.0.1'"
 
183
p92
 
184
sS'env'
 
185
p93
 
186
S"<Storage {'http_user_agent': 'Mozilla/5.0 (X11; ...ce': False, 'path_info': '/pyquiz/default/list'}>"
 
187
p94
 
188
sS'raw_args'
 
189
p95
 
190
S'None'
 
191
p96
 
192
sS'get_vars'
 
193
p97
 
194
S'<Storage {}>'
 
195
p98
 
196
sS'folder'
 
197
p99
 
198
S"'/home/dreich/lib/python/web2py/applications/pyquiz/'"
 
199
p100
 
200
sS'now'
 
201
p101
 
202
S'datetime.datetime(2010, 8, 13, 13, 38, 36, 102389)'
 
203
p102
 
204
sS'post_vars'
 
205
p103
 
206
S'<Storage {}>'
 
207
p104
 
208
ssS'frames'
 
209
p105
 
210
(lp106
 
211
(dp107
 
212
S'file'
 
213
p108
 
214
S'/home/dreich/lib/python/web2py/gluon/restricted.py'
 
215
p109
 
216
sS'dump'
 
217
p110
 
218
(dp111
 
219
S'code'
 
220
p112
 
221
S"'# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n'"
 
222
p113
 
223
sS'layer'
 
224
p114
 
225
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
 
226
p115
 
227
sS'global compile2'
 
228
p116
 
229
S'<function compile2>'
 
230
p117
 
231
sS'ccode'
 
232
p118
 
233
S'undefined'
 
234
p119
 
235
ssS'lnum'
 
236
p120
 
237
I184
 
238
sS'lines'
 
239
p121
 
240
(dp122
 
241
I179
 
242
S''
 
243
sI180
 
244
S'    try:'
 
245
p123
 
246
sI181
 
247
S'        if type(code) == types.CodeType:'
 
248
p124
 
249
sI182
 
250
S'            ccode = code'
 
251
p125
 
252
sI183
 
253
S'        else:'
 
254
p126
 
255
sI184
 
256
S'            ccode = compile2(code,layer)'
 
257
p127
 
258
sI185
 
259
S''
 
260
sI186
 
261
S'        exec ccode in environment'
 
262
p128
 
263
sI187
 
264
S'    except HTTP:'
 
265
p129
 
266
sI188
 
267
S'        raise'
 
268
p130
 
269
ssS'call'
 
270
p131
 
271
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')"
 
272
p132
 
273
sS'func'
 
274
p133
 
275
S'restricted'
 
276
p134
 
277
sa(dp135
 
278
g108
 
279
S'/home/dreich/lib/python/web2py/gluon/restricted.py'
 
280
p136
 
281
sg110
 
282
(dp137
 
283
S'builtincompile'
 
284
p138
 
285
S'<built-in function compile>'
 
286
p139
 
287
sS'code'
 
288
p140
 
289
S"'# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n'"
 
290
p141
 
291
sS'code.rstrip'
 
292
p142
 
293
S'<built-in method rstrip of str object>'
 
294
p143
 
295
sS').replace'
 
296
p144
 
297
g119
 
298
sS'layer'
 
299
p145
 
300
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
 
301
p146
 
302
ssg120
 
303
I171
 
304
sg121
 
305
(dp147
 
306
I166
 
307
S''
 
308
sI167
 
309
S'def compile2(code,layer):'
 
310
p148
 
311
sI168
 
312
S'    """'
 
313
p149
 
314
sI169
 
315
S"    The +'\\n' is necessary else compile fails when code ends in a comment."
 
316
p150
 
317
sI170
 
318
S'    """'
 
319
p151
 
320
sI171
 
321
S"    return compile(code.rstrip().replace('\\r\\n','\\n')+'\\n', layer, 'exec')"
 
322
p152
 
323
sI172
 
324
S''
 
325
sI173
 
326
S"def restricted(code, environment={}, layer='Unknown'):"
 
327
p153
 
328
sI174
 
329
S'    """'
 
330
p154
 
331
sI175
 
332
S'    runs code in environment and returns the output. if an exception occurs'
 
333
p155
 
334
ssg131
 
335
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')"
 
336
p156
 
337
sg133
 
338
S'compile2'
 
339
p157
 
340
sasS'pyver'
 
341
p158
 
342
S'Python 2.6.5: /usr/bin/python'
 
343
p159
 
344
sS'session'
 
345
p160
 
346
(dp161
 
347
S'lastresults'
 
348
p162
 
349
S"'No failed doctests, you passed the quiz!'"
 
350
p163
 
351
sS'lastquiz'
 
352
p164
 
353
S"'30'"
 
354
p165
 
355
sS'flash'
 
356
p166
 
357
S'None'
 
358
p167
 
359
sS'auth'
 
360
p168
 
361
S"<Storage {'expiration': 3600, 'user': <Storage {..., 8, 13, 13, 38, 36, 102389), 'remember': False}>"
 
362
p169
 
363
sS'lastcode'
 
364
p170
 
365
S"'limit = 2'"
 
366
p171
 
367
sS'_formkey[login]'
 
368
p172
 
369
S"'76907923-c3df-48da-a12e-865e67ee396c'"
 
370
p173
 
371
sS'_formkey[quiz_create]'
 
372
p174
 
373
S"'cc03d533-0a60-42de-a336-a11af68f2e34'"
 
374
p175
 
375
ssS'etype'
 
376
p176
 
377
S"<type 'exceptions.SyntaxError'>"
 
378
p177
 
379
sS'date'
 
380
p178
 
381
S'Fri Aug 13 13:38:36 2010'
 
382
p179
 
383
sS'response'
 
384
p180
 
385
(dp181
 
386
S'status'
 
387
p182
 
388
S'200'
 
389
p183
 
390
sg70
 
391
S'<cStringIO.StringO object>'
 
392
p184
 
393
sg85
 
394
S"<SimpleCookie: session_id_pyquiz='127-0-0-1-551bff65-0c08-476c-a819-2b1685d3c115'>"
 
395
p185
 
396
sS'_vars'
 
397
p186
 
398
S'None'
 
399
p187
 
400
sS'title'
 
401
p188
 
402
S"'pyquiz'"
 
403
p189
 
404
sS'session_file'
 
405
p190
 
406
S"<open file '/home/dreich/lib/python/web2py/appli...51bff65-0c08-476c-a819-2b1685d3c115', mode 'rb+'>"
 
407
p191
 
408
sS'flash'
 
409
p192
 
410
S"''"
 
411
p193
 
412
sS'_custom_rollback'
 
413
p194
 
414
S'None'
 
415
p195
 
416
sS'session_id'
 
417
p196
 
418
S"'127-0-0-1-551bff65-0c08-476c-a819-2b1685d3c115'"
 
419
p197
 
420
sS'headers'
 
421
p198
 
422
S"<Storage {'Expires': 'Fri, 13 Aug 2010 17:38:36 ...he, must-revalidate, post-check=0, pre-check=0'}>"
 
423
p199
 
424
sS'meta'
 
425
p200
 
426
S'<Storage {}>'
 
427
p201
 
428
sS'session_filename'
 
429
p202
 
430
S"'/home/dreich/lib/python/web2py/applications/pyqu...ns/127-0-0-1-551bff65-0c08-476c-a819-2b1685d3c115'"
 
431
p203
 
432
sS'postprocessing'
 
433
p204
 
434
S'[]'
 
435
p205
 
436
sS'menu'
 
437
p206
 
438
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', []]]"
 
439
p207
 
440
sS'_view_environment'
 
441
p208
 
442
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'>, ...}"
 
443
p209
 
444
sS'subtitle'
 
445
p210
 
446
S"<lazyT 'Quizzes in Python'>"
 
447
p211
 
448
sS'session_id_name'
 
449
p212
 
450
S"'session_id_pyquiz'"
 
451
p213
 
452
sS'_custom_commit'
 
453
p214
 
454
S'None'
 
455
p215
 
456
sS'_caller'
 
457
p216
 
458
S'<function <lambda>>'
 
459
p217
 
460
sS'files'
 
461
p218
 
462
S'[]'
 
463
p219
 
464
sS'view'
 
465
p220
 
466
S"'default/list.html'"
 
467
p221
 
468
ssS'locals'
 
469
p222
 
470
(dp223
 
471
g3
 
472
S"'/home/dreich/lib/python/web2py/applications/pyquiz/controllers/default.py'"
 
473
p224
 
474
sg5
 
475
S"'# -*- coding: utf-8 -*- \\n\\n######################...t,db)\\n\\n\\n\\n\\n\\nresponse._vars=response._caller(list)\\n'"
 
476
p225
 
477
sssS'traceback'
 
478
p226
 
479
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'
 
480
p227
 
481
s.
 
 
b'\\ No newline at end of file'