Changeset 376
- Timestamp:
- 08/27/06 00:41:23 (18 years ago)
- Location:
- pkpgcounter/trunk/pkpgpdls
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/analyzer.py
r370 r376 242 242 totalsize += parser.getJobSize() 243 243 else : 244 result = parser.getInkCoverage() 245 totalsize += len(result) 246 print result 244 (cspace, pages) = parser.getInkCoverage() 245 totalsize += len(pages) 246 for page in pages : 247 for k in cspace : 248 try : 249 print "%s : %f " % (k, page[k]), 250 except KeyError : 251 pass 252 print 247 253 except (IOError, pdlparser.PDLParserError), msg : 248 254 sys.stderr.write("ERROR: %s\n" % msg) -
pkpgcounter/trunk/pkpgpdls/inkcoverage.py
r363 r376 103 103 while 1 : 104 104 nbpixels = image.size[0] * image.size[1] 105 result.append( { colorspace : computation(image, nbpixels) })105 result.append(computation(image, nbpixels)) 106 106 index += 1 107 107 image.seek(index) 108 108 except EOFError : 109 109 pass 110 return result110 return (colorspace, result) 111 111 112 112 if __name__ == "__main__" :