Changeset 553 for pkpgcounter

Show
Ignore:
Timestamp:
12/09/07 14:57:41 (17 years ago)
Author:
jerome
Message:

Remove unneeded import statements.

Location:
pkpgcounter/trunk/pkpgpdls
Files:
2 modified

Legend:

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

    r552 r553  
    2323"""This modules implements a page counter for Canon BJ documents.""" 
    2424 
    25 import sys 
    2625import os 
    2726import mmap 
    28 from struct import unpack 
    2927 
    3028import pdlparser 
  • pkpgcounter/trunk/pkpgpdls/pnmascii.py

    r551 r553  
    3030    openmode = "rU"                  
    3131    def isValid(self) :     
    32         """Returns True if data is plain text, else False. 
    33          
    34            It's hard to detect a plain text file, so we just try to 
    35            extract lines from the first block (sufficiently large). 
    36            If it's impossible to find one we consider it's not plain text. 
    37         """    
    38         if (self.firstblock.split()[0] in ("P1", "P2", "P3")) : 
     32        """Returns True if data is ASCII PNM, else False.""" 
     33        if self.firstblock.split()[0] in ("P1", "P2", "P3") : 
    3934            self.logdebug("DEBUG: Input file seems to be in the PNM (ascii) format.") 
    4035            self.marker = self.firstblock[:2] 
     
    5449                # Special case of cmyk map 
    5550                divby = 4 
     51            # Unfortunately any whitespace is valid,  
     52            # so we do it the slow way... 
    5653            pagecount += line.split().count(marker) 
    5754