comparison cherryFxTest.py @ 11:15260ae0d6bc

• modified html templates for audio environment classification experiment (10 audio files and 10 classes for each test page) • modidfied cherryFxTest to be consistent with audio templates and to include files from AASPAudio • included AASPAudio (recordings for audio environment classification)
author Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk>
date Mon, 11 Mar 2013 13:31:44 +0000
parents 9ab73065952b
children 8a595d55e245
comparison
equal deleted inserted replaced
10:9ab73065952b 11:15260ae0d6bc
1
2 import cherrypy, os, random, smtplib, string 1 import cherrypy, os, random, smtplib, string
3 from cherrypy.lib.static import serve_file 2 from cherrypy.lib.static import serve_file
4 from templates import * 3 from templates import *
5 4
6 from DirectorySession import DirectorySession 5 from DirectorySession import DirectorySession
26 25
27 26
28 class HomePage: 27 class HomePage:
29 def index(self): 28 def index(self):
30 29
31 return "move along, nothing to see here!" 30 return "This is the home page..."
32 31
33 index.exposed = True 32 index.exposed = True
34 33
35
36
37 class TestPage: 34 class TestPage:
38 35
39 def getFiles(self): 36 def getAASPFiles(self):
40 audiodir = './audio' 37 audioDir = '/Users/daniele/Documents/AASPChallenge/survey/AASPAudio'
41 cherrypy.session['fxs'] = [cherrypy.session['f'] for cherrypy.session['f'] in os.listdir(audiodir) if os.path.isdir(os.path.join(audiodir, cherrypy.session['f']))] 38 cherrypy.session['cats'] = [cherrypy.session['f'] for cherrypy.session['f'] in os.listdir(audioDir) if os.path.isdir(os.path.join(audioDir,cherrypy.session['f']))]
42 cherrypy.session['fxs'].remove('dry') 39 print cherrypy.session['cats']
43 print cherrypy.session['fxs']
44 40
45 def index(self): 41 def index(self):
46 TestPage.getFiles(self) 42 TestPage.getAASPFiles(self)
47 cherrypy.session['sid'] = None 43 cherrypy.session['sid'] = None
48 44
49 cherrypy.session['sid_filename'] = None 45 cherrypy.session['sid_filename'] = None
50 46
51 47
58 54
59 cherrypy.session['test'] = None 55 cherrypy.session['test'] = None
60 cherrypy.session['results'] = None 56 cherrypy.session['results'] = None
61 cherrypy.session['tests'] = None 57 cherrypy.session['tests'] = None
62 cherrypy.session['test_nr'] = None 58 cherrypy.session['test_nr'] = None
63 cherrypy.session['audio_pairs'] = None 59 cherrypy.session['audio'] = None
64 cherrypy.session['page'] = 0 60 cherrypy.session['page'] = 0
65 cherrypy.session['pages'] = 6 61 cherrypy.session['pages'] = 6
66 cherrypy.session['userinfobox'] = None 62 cherrypy.session['userinfobox'] = None
67 cherrypy.session['ts'] = None 63 cherrypy.session['ts'] = None
68 #return ''' 64 #return '''
70 # <a href="/test/">start test</a> 66 # <a href="/test/">start test</a>
71 # </p>''' 67 # </p>'''
72 68
73 #take 2 examples for each effect 69 #take 2 examples for each effect
74 70
75 cherrypy.session['audio_pairs'] = [] 71 cherrypy.session['audio'] = []
76 72
77 # get effected files: 73 # get effected files:
78 74 cherrypy.session['audio'] = []
79 for cherrypy.session['fx'] in cherrypy.session['fxs']: 75 for cherrypy.session['cat'] in cherrypy.session['cats']:
80 cherrypy.session['dirlist'] = os.listdir('./audio/%s/'%cherrypy.session['fx']) 76 cherrypy.session['dirlist'] = os.listdir('/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s/'%cherrypy.session['cat'])
81 cherrypy.session['filelist'] = []
82 for cherrypy.session['item'] in cherrypy.session['dirlist']: 77 for cherrypy.session['item'] in cherrypy.session['dirlist']:
83 if cherrypy.session['item'].split('.')[-1] == 'mp3': 78 if cherrypy.session['item'].split('.')[-1] == 'wav':
84 cherrypy.session['filelist'].append(cherrypy.session['item'].split('.')[0]) 79 cherrypy.session['audio'].append(cherrypy.session['cat'] + '/' + cherrypy.session['item'].split('.')[0])
85 80
86 # create audio pairs for this fx 81
87 82 #print TestPage.audio
88 cherrypy.session['first'] = cherrypy.session['second'] = random.choice(cherrypy.session['filelist']) 83 random.shuffle(cherrypy.session['audio'])
89 while cherrypy.session['first'] == cherrypy.session['second']:
90 cherrypy.session['second'] = random.choice(cherrypy.session['filelist'])
91
92 cherrypy.session['dry1'] = 'dry/%s' %cherrypy.session['first'].split('_%s'%cherrypy.session['fx'])[0]
93 cherrypy.session['fx1'] = '%s/%s' %(cherrypy.session['fx'], cherrypy.session['first'])
94 cherrypy.session['dry2'] = 'dry/%s' %cherrypy.session['second'].split('_%s'%cherrypy.session['fx'])[0]
95 cherrypy.session['fx2'] = '%s/%s' %(cherrypy.session['fx'], cherrypy.session['second'])
96 cherrypy.session['audio_pairs'].append([cherrypy.session['fx'], cherrypy.session['dry1'], cherrypy.session['fx1']])
97 cherrypy.session['audio_pairs'].append([cherrypy.session['fx'], cherrypy.session['dry2'], cherrypy.session['fx2']])
98
99 #print TestPage.audio_pairs
100 random.shuffle(cherrypy.session['audio_pairs'])
101 84
102 print "NUMBER OF TESTS:" 85 print "NUMBER OF TESTS:"
103 print len(cherrypy.session['audio_pairs']) 86 print len(cherrypy.session['audio'])
104 87
105 cherrypy.session['sid'] = cherrypy.session.get_session_path().split('/')[1] 88 cherrypy.session['sid'] = cherrypy.session.get_session_path().split('/')[1]
106 print cherrypy.session['sid'] 89 print cherrypy.session['sid']
107 90
108 #print cherrypy.session['audio_pairs'] 91 #print cherrypy.session['audio']
109 pprint(cherrypy.session['audio_pairs']) 92 pprint(cherrypy.session['audio'])
110 93
111 94
112 TestPage.outfileid = '%s' %cherrypy.session['sid'] 95 TestPage.outfileid = '%s' %cherrypy.session['sid']
113 ida = 0 96 ida = 0
114 while os.path.exists('./sessions/%s/%s.txt' %(cherrypy.session['sid'], TestPage.outfileid)): 97 while os.path.exists('./sessions/%s/%s.txt' %(cherrypy.session['sid'], TestPage.outfileid)):
117 100
118 101
119 return welcome_templ %cherrypy.session['sid'] 102 return welcome_templ %cherrypy.session['sid']
120 103
121 104
122 def doStart(self, pageId, sessionId, startButton, uinfo00=None, uinfo01=None, uinfo02=None, info1=None, info2=None, info3=None, info4=None, info5=None): 105 def doStart(self, pageId, sessionId, startButton, uinfo00=None, uinfo01=None, info1=None):
123 106
124 107
125 108
126 if cherrypy.session['page'] != int(pageId): 109 if cherrypy.session['page'] != int(pageId):
127 print "################################# BACK BUTTON PRESSED #################################" 110 print "################################# BACK BUTTON PRESSED #################################"
132 #cherrypy.session['page'] = int(pageId) 115 #cherrypy.session['page'] = int(pageId)
133 116
134 117
135 118
136 119
137 cherrypy.session['userinfobox'] = str([str(uinfo00), str(uinfo01), str(uinfo02), int(info1), int(info2), int(info3), int(info4), int(info5)]) + '\n' 120 cherrypy.session['userinfobox'] = str([str(uinfo00), str(uinfo01), int(info1)]) + '\n'
138 cherrypy.session['sessionId'] = sessionId 121 cherrypy.session['sessionId'] = sessionId
139 #print "sid:" 122 #print "sid:"
140 #print TestPage.sid 123 #print TestPage.sid
141 #print sessionId 124 #print sessionId
142 if cherrypy.session['sid'] != str(cherrypy.session['sessionId']): 125 if cherrypy.session['sid'] != str(cherrypy.session['sessionId']):
149 def index2(self): 132 def index2(self):
150 #try: print testvar 133 #try: print testvar
151 #except: pass 134 #except: pass
152 135
153 cherrypy.session['page'] = 1 136 cherrypy.session['page'] = 1
154 cherrypy.session['pages'] = 7 137 cherrypy.session['pages'] = 10
155 cherrypy.session['tests'] = len(cherrypy.session['audio_pairs']) #should be 66 #10 * cherrypy.session['pages'] 138 cherrypy.session['tests'] = len(cherrypy.session['audio']) #should be 66 #10 * cherrypy.session['pages']
156 cherrypy.session['results'] = [] 139 cherrypy.session['results'] = []
157 for cherrypy.session['n'] in xrange(cherrypy.session['tests']): cherrypy.session['results'].append([None,0,0,0,0]) 140 for cherrypy.session['n'] in xrange(cherrypy.session['tests']): cherrypy.session['results'].append([None])
158 141
159 # create tuple to fill template 142 # create tuple to fill template
160 cherrypy.session['ts'] = [] 143 cherrypy.session['ts'] = []
161 for cherrypy.session['k'] in xrange(40): 144 for cherrypy.session['k'] in xrange(10):
162 cherrypy.session['ts'].append(0) 145 cherrypy.session['ts'].append(0)
163 146
164 return audiotempl%TestPage.makeTuple(self, 10) 147 return audiotempl%TestPage.makeTuple(self, 10)
165 148
166 def doAttrib(self, pageId, sessionId, submitButton, attribute1_1=None, attribute1_2=None, attribute1_3=None, attribute1_4=None, attribute2_1=None, attribute2_2=None, attribute2_3=None, attribute2_4=None, attribute3_1=None, attribute3_2=None, attribute3_3=None, attribute3_4=None, attribute4_1=None, attribute4_2=None, attribute4_3=None, attribute4_4=None, attribute5_1=None, attribute5_2=None, attribute5_3=None, attribute5_4=None, attribute6_1=None, attribute6_2=None, attribute6_3=None, attribute6_4=None, attribute7_1=None, attribute7_2=None, attribute7_3=None, attribute7_4=None, attribute8_1=None, attribute8_2=None, attribute8_3=None, attribute8_4=None, attribute9_1=None, attribute9_2=None, attribute9_3=None, attribute9_4=None, attribute10_1=None, attribute10_2=None, attribute10_3=None, attribute10_4=None): 149 def doAttrib(self, pageId, sessionId, submitButton, attribute1=None, attribute2=None, attribute3=None, attribute4=None, attribute5=None, attribute6=None, attribute7=None, attribute8=None, attribute9=None, attribute10=None):
167 #print attribute1 + ' ' + attribute2 150 #print attribute1 + ' ' + attribute2
168 # Error check 151 # Error check
169 152
170 print "################################# %s" %pageId 153 print "################################# %s" %pageId
171 #_pageId = int(pageId) - 1 154 #_pageId = int(pageId) - 1
180 163
181 #store results 164 #store results
182 165
183 cherrypy.session['pos'] = 10 * (cherrypy.session['page'] - 1) 166 cherrypy.session['pos'] = 10 * (cherrypy.session['page'] - 1)
184 167
185 cherrypy.session['results'][cherrypy.session['pos']] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']][2].split('/')[-1], int(attribute1_1), int(attribute1_2), int(attribute1_3), int(attribute1_4)] 168 cherrypy.session['results'][cherrypy.session['pos']] = [cherrypy.session['audio'][cherrypy.session['pos']][2].split('/')[-1], int(attribute1)]
186 cherrypy.session['results'][cherrypy.session['pos']+1] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+1][2].split('/')[-1], int(attribute2_1), int(attribute2_2), int(attribute2_3), int(attribute2_4)] 169 cherrypy.session['results'][cherrypy.session['pos']+1] = [cherrypy.session['audio'][cherrypy.session['pos']+1][2].split('/')[-1], int(attribute2)]
187 cherrypy.session['results'][cherrypy.session['pos']+2] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+2][2].split('/')[-1], int(attribute3_1), int(attribute3_2), int(attribute3_3), int(attribute3_4)] 170 cherrypy.session['results'][cherrypy.session['pos']+2] = [cherrypy.session['audio'][cherrypy.session['pos']+2][2].split('/')[-1], int(attribute3)]
188 cherrypy.session['results'][cherrypy.session['pos']+3] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+3][2].split('/')[-1], int(attribute4_1), int(attribute4_2), int(attribute4_3), int(attribute4_4)] 171 cherrypy.session['results'][cherrypy.session['pos']+3] = [cherrypy.session['audio'][cherrypy.session['pos']+3][2].split('/')[-1], int(attribute4)]
189 cherrypy.session['results'][cherrypy.session['pos']+4] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+4][2].split('/')[-1], int(attribute5_1), int(attribute5_2), int(attribute5_3), int(attribute5_4)] 172 cherrypy.session['results'][cherrypy.session['pos']+4] = [cherrypy.session['audio'][cherrypy.session['pos']+4][2].split('/')[-1], int(attribute5)]
190 cherrypy.session['results'][cherrypy.session['pos']+5] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+5][2].split('/')[-1], int(attribute6_1), int(attribute6_2), int(attribute6_3), int(attribute6_4)] 173 cherrypy.session['results'][cherrypy.session['pos']+5] = [cherrypy.session['audio'][cherrypy.session['pos']+5][2].split('/')[-1], int(attribute6)]
191 cherrypy.session['results'][cherrypy.session['pos']+6] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+6][2].split('/')[-1], int(attribute7_1), int(attribute7_2), int(attribute7_3), int(attribute7_4)] 174 cherrypy.session['results'][cherrypy.session['pos']+6] = [cherrypy.session['audio'][cherrypy.session['pos']+6][2].split('/')[-1], int(attribute7)]
192 cherrypy.session['results'][cherrypy.session['pos']+7] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+7][2].split('/')[-1], int(attribute8_1), int(attribute8_2), int(attribute8_3), int(attribute8_4)] 175 cherrypy.session['results'][cherrypy.session['pos']+7] = [cherrypy.session['audio'][cherrypy.session['pos']+7][2].split('/')[-1], int(attribute8)]
193 cherrypy.session['results'][cherrypy.session['pos']+8] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+8][2].split('/')[-1], int(attribute9_1), int(attribute9_2), int(attribute9_3), int(attribute9_4)] 176 cherrypy.session['results'][cherrypy.session['pos']+8] = [cherrypy.session['audio'][cherrypy.session['pos']+8][2].split('/')[-1], int(attribute9)]
194 cherrypy.session['results'][cherrypy.session['pos']+9] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+9][2].split('/')[-1], int(attribute10_1), int(attribute10_2), int(attribute10_3), int(attribute10_4)] 177 cherrypy.session['results'][cherrypy.session['pos']+9] = [cherrypy.session['audio'][cherrypy.session['pos']+9][2].split('/')[-1], int(attribute10)]
195 178
196 179
197 resString = cherrypy.session['ip'] + '\n' + TestPage.outfileid + '\n' + cherrypy.session['userinfobox'] + '\n' + ',\n'.join(str(x) for x in cherrypy.session['results']) 180 resString = cherrypy.session['ip'] + '\n' + TestPage.outfileid + '\n' + cherrypy.session['userinfobox'] + '\n' + ',\n'.join(str(x) for x in cherrypy.session['results'])
198 181
199 #f = open(TestPage.sid_filename, 'w') 182 #f = open(TestPage.sid_filename, 'w')
217 for cherrypy.session['i'] in xrange(4): 200 for cherrypy.session['i'] in xrange(4):
218 #print cherrypy.session['k'] 201 #print cherrypy.session['k']
219 #print cherrypy.session['i'] 202 #print cherrypy.session['i']
220 cherrypy.session['ts'].append(cherrypy.session['results'][cherrypy.session['npos']+cherrypy.session['k']][cherrypy.session['i']+1]) 203 cherrypy.session['ts'].append(cherrypy.session['results'][cherrypy.session['npos']+cherrypy.session['k']][cherrypy.session['i']+1])
221 204
222 if cherrypy.session['page'] < cherrypy.session['pages']: 205 return audiotempl%TestPage.makeTuple(self, cherrypy.session['m'])
223 return audiotempl%TestPage.makeTuple(self, cherrypy.session['m'])
224 else:
225 return audiotemplast%TestPage.makeTuple(self, cherrypy.session['m'])
226 206
227 207
228 index.exposed = True 208 index.exposed = True
229 doAttrib.exposed = True 209 doAttrib.exposed = True
230 index2.exposed = True 210 index2.exposed = True
231 doStart.exposed = True 211 doStart.exposed = True
232 212
233 213
234 def doAttrib2(self, pageId, sessionId, submitButton, attribute1_1=None, attribute1_2=None, attribute1_3=None, attribute1_4=None, attribute2_1=None, attribute2_2=None, attribute2_3=None, attribute2_4=None, attribute3_1=None, attribute3_2=None, attribute3_3=None, attribute3_4=None, attribute4_1=None, attribute4_2=None, attribute4_3=None, attribute4_4=None, attribute5_1=None, attribute5_2=None, attribute5_3=None, attribute5_4=None, attribute6_1=None, attribute6_2=None, attribute6_3=None, attribute6_4=None): 214 def doAttrib2(self, pageId, sessionId, submitButton, attribute1=None, attribute2=None, attribute3=None, attribute4=None, attribute5=None, attribute6=None):
235 #print attribute1 + ' ' + attribute2 215 #print attribute1 + ' ' + attribute2
236 # Error check 216 # Error check
237 217
238 print "################################# %s" %pageId 218 print "################################# %s" %pageId
239 #_pageId = int(pageId) - 1 219 #_pageId = int(pageId) - 1
248 228
249 #store results 229 #store results
250 230
251 cherrypy.session['pos'] = 10 * (cherrypy.session['page'] - 1) 231 cherrypy.session['pos'] = 10 * (cherrypy.session['page'] - 1)
252 232
253 cherrypy.session['results'][cherrypy.session['pos']] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']][2].split('/')[-1], int(attribute1_1), int(attribute1_2), int(attribute1_3), int(attribute1_4)] 233 cherrypy.session['results'][cherrypy.session['pos']] = [cherrypy.session['audio'][cherrypy.session['pos']][2].split('/')[-1], int(attribute1)]
254 cherrypy.session['results'][cherrypy.session['pos']+1] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+1][2].split('/')[-1], int(attribute2_1), int(attribute2_2), int(attribute2_3), int(attribute2_4)] 234 cherrypy.session['results'][cherrypy.session['pos']+1] = [cherrypy.session['audio'][cherrypy.session['pos']+1][2].split('/')[-1], int(attribute2)]
255 cherrypy.session['results'][cherrypy.session['pos']+2] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+2][2].split('/')[-1], int(attribute3_1), int(attribute3_2), int(attribute3_3), int(attribute3_4)] 235 cherrypy.session['results'][cherrypy.session['pos']+2] = [cherrypy.session['audio'][cherrypy.session['pos']+2][2].split('/')[-1], int(attribute3)]
256 cherrypy.session['results'][cherrypy.session['pos']+3] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+3][2].split('/')[-1], int(attribute4_1), int(attribute4_2), int(attribute4_3), int(attribute4_4)] 236 cherrypy.session['results'][cherrypy.session['pos']+3] = [cherrypy.session['audio'][cherrypy.session['pos']+3][2].split('/')[-1], int(attribute4)]
257 cherrypy.session['results'][cherrypy.session['pos']+4] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+4][2].split('/')[-1], int(attribute5_1), int(attribute5_2), int(attribute5_3), int(attribute5_4)] 237 cherrypy.session['results'][cherrypy.session['pos']+4] = [cherrypy.session['audio'][cherrypy.session['pos']+4][2].split('/')[-1], int(attribute5)]
258 cherrypy.session['results'][cherrypy.session['pos']+5] = [cherrypy.session['audio_pairs'][cherrypy.session['pos']+5][2].split('/')[-1], int(attribute6_1), int(attribute6_2), int(attribute6_3), int(attribute6_4)] 238 cherrypy.session['results'][cherrypy.session['pos']+5] = [cherrypy.session['audio'][cherrypy.session['pos']+5][2].split('/')[-1], int(attribute6)]
259 239
260 240
261 241
262 resString = cherrypy.session['ip'] + '\n' + cherrypy.session['sid'] + '\n' + cherrypy.session['userinfobox'] + '\n' + ',\n'.join(str(x) for x in cherrypy.session['results']) 242 resString = cherrypy.session['ip'] + '\n' + cherrypy.session['sid'] + '\n' + cherrypy.session['userinfobox'] + '\n' + ',\n'.join(str(x) for x in cherrypy.session['results'])
263 243
303 cherrypy.session['ts'].append(cherrypy.session['page']) 283 cherrypy.session['ts'].append(cherrypy.session['page'])
304 cherrypy.session['ts'].append(cherrypy.session['pages']) 284 cherrypy.session['ts'].append(cherrypy.session['pages'])
305 for cherrypy.session['k'] in xrange(cherrypy.session['nr']): 285 for cherrypy.session['k'] in xrange(cherrypy.session['nr']):
306 pos = 10 * (cherrypy.session['page'] - 1) + cherrypy.session['k'] 286 pos = 10 * (cherrypy.session['page'] - 1) + cherrypy.session['k']
307 #print pos 287 #print pos
308 for n in xrange(3): cherrypy.session['ts'].append(cherrypy.session['audio_pairs'][pos][1]) 288 cherrypy.session['ts'].append(cherrypy.session['audio'][pos])
309 for n in xrange(3): cherrypy.session['ts'].append(cherrypy.session['audio_pairs'][pos][2])
310 cherrypy.session['ts'].append(cherrypy.session['page']) 289 cherrypy.session['ts'].append(cherrypy.session['page'])
311 cherrypy.session['ts'].append(cherrypy.session['sid']) 290 cherrypy.session['ts'].append(cherrypy.session['sid'])
312 cherrypy.session['ts'] = tuple(cherrypy.session['ts']) 291 cherrypy.session['ts'] = tuple(cherrypy.session['ts'])
313 print cherrypy.session['ts'] 292 print cherrypy.session['ts']
314 return cherrypy.session['ts'] 293 return cherrypy.session['ts']
355 class OutPage: 334 class OutPage:
356 def index(self): 335 def index(self):
357 return ''' 336 return '''
358 <html> 337 <html>
359 <body> 338 <body>
360 <div id="video">
361 <embed id="roll-video" src="http://www.dafk.net/what/ilovethe80s.swf" width="400" height="300"></embed>
362 </div>
363 </body> 339 </body>
364 </html> 340 </html>
365 341
366 ''' 342 '''
367 index.exposed = True 343 index.exposed = True
411 # cherrypy.quickstart(root, config=conf) 387 # cherrypy.quickstart(root, config=conf)
412 388
413 # Of course we can also mount request handler objects right here! 389 # Of course we can also mount request handler objects right here!
414 root = HomePage() 390 root = HomePage()
415 root.test = TestPage() 391 root.test = TestPage()
416 root.daniele = TestPage() 392 #root.out = OutPage()
417 root.out = OutPage()
418 #root = TestPage() 393 #root = TestPage()
419 394
420 server = CherryPyServer(ServerConfig(root=root,local=local,conf=conf)) 395 server = CherryPyServer(ServerConfig(root=root,local=local,conf=conf))
421 # if local : 396 # if local :
422 # server = CherryPyServer(ServerConfig(root=root,local=local,conf=conf)) 397 # server = CherryPyServer(ServerConfig(root=root,local=local,conf=conf))
434 import sys 409 import sys
435 startFxTest(sys.argv[1:]) 410 startFxTest(sys.argv[1:])
436 else: 411 else:
437 # This branch is for the test suite; you can ignore it. 412 # This branch is for the test suite; you can ignore it.
438 cherrypy.tree.mount(root, config=tutconf) 413 cherrypy.tree.mount(root, config=tutconf)
439