Show
Ignore:
Timestamp:
10/06/08 00:22:07 (16 years ago)
Author:
jerome
Message:

Removed spaces at EOL.

Files:
1 modified

Legend:

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

    r3410 r3436  
    88# the Free Software Foundation, either version 3 of the License, or 
    99# (at your option) any later version. 
    10 #  
     10# 
    1111# This program is distributed in the hope that it will be useful, 
    1212# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1313# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414# GNU General Public License for more details. 
    15 #  
     15# 
    1616# You should have received a copy of the GNU General Public License 
    1717# along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     
    3434    required = [ "cp" ] 
    3535    format = "TIFF" 
    36     def isValid(self) :         
     36    def isValid(self) : 
    3737        """Returns True if data is TIFF, else False.""" 
    3838        littleendian = (chr(0x49)*2) + chr(0x2a) + chr(0) 
     
    4040        if self.firstblock[:4] in (littleendian, bigendian) : 
    4141            return True 
    42         else :     
     42        else : 
    4343            return False 
    44      
     44 
    4545    def getJobSize(self) : 
    4646        """Counts pages in a TIFF document. 
    47          
     47 
    4848           Algorithm by Jerome Alet. 
    49             
     49 
    5050           The documentation used for this was : 
    51             
     51 
    5252           http://www.ee.cooper.edu/courses/course_pages/past_courses/EE458/TIFF/ 
    5353        """ 
     
    6363            integerbyteorder = ">I" 
    6464            shortbyteorder = ">H" 
    65         else :     
     65        else : 
    6666            raise pdlparser.PDLParserError, "Unknown file endianness." 
    67         pos = 4     
     67        pos = 4 
    6868        try : 
    69             try :     
     69            try : 
    7070                nextifdoffset = unpack(integerbyteorder, minfile[pos : pos + 4])[0] 
    7171                while nextifdoffset : 
     
    7474                    nextifdoffset = unpack(integerbyteorder, minfile[pos : pos + 4])[0] 
    7575                    pagecount += 1 
    76             except IndexError :             
     76            except IndexError : 
    7777                pass 
    78         finally :         
     78        finally : 
    7979            minfile.close() 
    8080        return pagecount