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/escpages03.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/>. 
     
    3333    """A parser for ESC/PageS03 documents.""" 
    3434    format = "ESC/PageS03" 
    35     def isValid(self) :         
     35    def isValid(self) : 
    3636        """Returns True if data is TIFF, else False.""" 
    3737        if self.firstblock.startswith("\033\1@EJL") and \ 
    3838            (self.firstblock.find("=ESC/PAGES03\n") != -1) : 
    3939            return True 
    40         else :     
     40        else : 
    4141            return False 
    42      
     42 
    4343    def getJobSize(self) : 
    4444        """Counts pages in an ESC/PageS03 document. 
    45          
     45 
    4646           Algorithm by Jerome Alet. 
    4747           Reverse engineered the file format. 
     
    6161        lgendsequence = len(endsequence) 
    6262        try : 
    63             try :     
     63            try : 
    6464                while True : 
    6565                    if minfile[startpos] == startsequence : 
     
    8282                            if pagecount.startswith('"') and pagecount.endswith('"') : 
    8383                                pagecount = pagecount[1:-1] 
    84                             pagecount = int(pagecount)     
     84                            pagecount = int(pagecount) 
    8585                            if pagecount <= 0 : 
    8686                                pagecount = 1 # TODO : 0 or 1000000 ??? ;-) 
    8787                            break 
    88                         startpos += 1     
    89             except IndexError :             
     88                        startpos += 1 
     89            except IndexError : 
    9090                pass 
    91         finally :         
     91        finally : 
    9292            minfile.close() 
    9393        return pagecount