Show
Ignore:
Timestamp:
09/13/06 11:40:37 (18 years ago)
Author:
jerome
Message:

Integrated the SPL1 parser.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/spl1.py

    r409 r410  
    3131import pdlparser 
    3232import pjl 
     33import version 
    3334 
    3435ESCAPECHARS = (chr(0x1b), chr(0x24)) 
     
    112113                    else :     
    113114                        if not self.isbitmap : 
    114                             raise pdlparser.PDLParserError, "Unfortunately this file format is incompletely recognized. Parsing aborted." 
     115                            raise pdlparser.PDLParserError, "Unfortunately SPL1 is incompletely recognized. Parsing aborted. Please report the problem to %s" % version.__authoremail__ 
    115116                        offset = unpack(self.unpackLong, minfile[pos:pos+4])[0] 
    116117                        sequencenum = unpack(self.unpackShort, minfile[pos+4:pos+6])[0] 
    117118                        codesop = " ".join([ "%02x" % ord(v) for v in minfile[pos+6:pos+12]]) 
    118119                        if codesop != "06 00 00 80 13 40" : 
    119                             raise pdlparser.PDLParserError, "Unfortunately this file format is incompletely recognized. Parsing aborted." 
    120                         self.logdebug("%08x   ==>   %04x   ==>   %s" % (pos, sequencenum, codesop))     
     120                            raise pdlparser.PDLParserError, "Unfortunately SPL1 is incompletely recognized. Parsing aborted. Please report the problem to %s" % version.__authoremail__ 
    121121                        if not sequencenum : 
    122122                            self.pagecount += 1