Changeset 522 for pkpgcounter/trunk/pkpgpdls/pdlparser.py
- Timestamp:
- 11/28/07 11:13:33 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pdlparser.py
r520 r522 43 43 totiffcommands = None # Default command to convert to TIFF 44 44 openmode = "rb" # Default file opening mode 45 def __init__(self, parent ) :45 def __init__(self, parent, (firstblock, lastblock)) : 46 46 """Initialize the generic parser.""" 47 47 self.parent = parent 48 # We need some copies for later inclusion of parsers which 49 # would modify the parent's values 50 self.filename = parent.filename[:] 51 self.firstblock = firstblock[:] 52 self.lastblock = lastblock[:] 48 53 self.infile = None 49 54 if not self.isValid() : … … 58 63 # parsing will greatly benefit from this. 59 64 psyco.bind(self.getJobSize) 60 self.infile = open(self. parent.filename, self.openmode)61 # self.logdebug("Opened %s in '%s' mode." % (self. parent.filename, self.openmode))65 self.infile = open(self.filename, self.openmode) 66 # self.logdebug("Opened %s in '%s' mode." % (self.filename, self.openmode)) 62 67 63 68 def __del__(self) : … … 84 89 """ 85 90 if self.totiffcommands : 86 infname = self. parent.filename91 infname = self.filename 87 92 for totiffcommand in self.totiffcommands : 88 93 error = False