Rev 5039 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
import utilsdef getscore(struct):score = 0.0if struct.has_key('features'):features = struct.get('features')if features.has_key('Operating system provided'):os = str(features.get('Operating system provided')[0])if os == 'DOS':score = 7.0 #TODOelif os == 'Linux':score = 9.0 #TODOelif os == 'Windows 7 Basic':score = 8.0 #TODOelif os == 'Windows 7 Professional':score = 9.0 #TODOelif os == 'Windows 7 Starter':score = 8.0 #TODOelif os == 'Windows 7 Ultimate':score = 10.0 #TODOreturn scoreprint "expSlide=" + `expSlide`struct = utils.contentModel2Struct(expSlide, categoryObj)print "struct=" + `struct`score = getscore(struct)