Changeset 200 for pkpgcounter/trunk/pdlanalyzer/postscript.py
- Timestamp:
- 04/04/05 14:18:36 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pdlanalyzer/postscript.py
r196 r200 25 25 import popen2 26 26 27 from pdlanalyzer .pdlparser import PDLParser, PDLParserError27 from pdlanalyzer import pdlparser 28 28 29 class PostScriptParser( PDLParser) :29 class PostScriptParser(pdlparser.PDLParser) : 30 30 """A parser for PostScript documents.""" 31 31 def throughGhostScript(self) : … … 44 44 child.tochild.close() 45 45 except (IOError, OSError), msg : 46 raise PDLParserError, "Problem during analysis of Binary PostScript document : %s" % msg46 raise pdlparser.PDLParserError, "Problem during analysis of Binary PostScript document : %s" % msg 47 47 48 48 pagecount = 0 … … 50 50 pagecount = int(child.fromchild.readline().strip()) 51 51 except (IOError, OSError, AttributeError, ValueError), msg : 52 raise PDLParserError, "Problem during analysis of Binary PostScript document : %s" % msg52 raise pdlparser.PDLParserError, "Problem during analysis of Binary PostScript document : %s" % msg 53 53 child.fromchild.close() 54 54 … … 56 56 child.wait() 57 57 except OSError, msg : 58 raise PDLParserError, "Problem during analysis of Binary PostScript document : %s" % msg58 raise pdlparser.PDLParserError, "Problem during analysis of Binary PostScript document : %s" % msg 59 59 return pagecount * self.copies 60 60 … … 113 113 parser = PostScriptParser(infile, debug=1) 114 114 totalsize += parser.getJobSize() 115 except PDLParserError, msg :115 except pdlparser.PDLParserError, msg : 116 116 sys.stderr.write("ERROR: %s\n" % msg) 117 117 sys.stderr.flush()