Changeset 377 for pkpgcounter/trunk/pkpgpdls
- Timestamp:
- 08/27/06 22:57:22 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/analyzer.py
r376 r377 235 235 arguments.append("-") 236 236 totalsize = 0 237 lines = [] 237 238 try : 238 239 for arg in arguments : … … 243 244 else : 244 245 (cspace, pages) = parser.getInkCoverage() 245 totalsize += len(pages)246 246 for page in pages : 247 for k in cspace : 247 lineparts = [] 248 for k in cspace : # NB : this way we preserve the order of the planes 248 249 try : 249 print "%s : %f " % (k, page[k]),250 lineparts.append("%s : %f%%" % (k, page[k])) 250 251 except KeyError : 251 252 pass 252 print253 lines.append(" ".join(lineparts)) 253 254 except (IOError, pdlparser.PDLParserError), msg : 254 255 sys.stderr.write("ERROR: %s\n" % msg) … … 257 258 sys.stderr.write("WARN: Aborted at user's request.\n") 258 259 sys.stderr.flush() 259 print "%s" % totalsize 260 if not options.colorspace : 261 print "%s" % totalsize 262 else : 263 print "\n".join(lines) 260 264 261 265 if __name__ == "__main__" :