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/pil.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/>. 
     
    2626try : 
    2727    from PIL import Image 
    28 except ImportError :     
     28except ImportError : 
    2929    sys.stderr.write("ERROR: You MUST install the Python Imaging Library (python-imaging) for pkpgcounter to work.\n") 
    3030    raise pdlparser.PDLParserError, "The Python Imaging Library is missing." 
     
    3434class Parser(pdlparser.PDLParser) : 
    3535    """A parser for plain text documents.""" 
    36     totiffcommands = [ 'convert "%(infname)s" "%(outfname)s"' ]   
     36    totiffcommands = [ 'convert "%(infname)s" "%(outfname)s"' ] 
    3737    required = [ "convert" ] 
    38     def isValid(self) :     
    39         """Returns True if data is an image format supported by PIL, else False."""    
     38    def isValid(self) : 
     39        """Returns True if data is an image format supported by PIL, else False.""" 
    4040        try : 
    4141            image = Image.open(self.filename) 
    42         except (IOError, OverflowError) :     
     42        except (IOError, OverflowError) : 
    4343            return False 
    44         else :     
     44        else : 
    4545            self.format = "%s (%s)" % (image.format, image.format_description) 
    4646            return True 
    47              
     47 
    4848    def getJobSize(self) : 
    4949        """Counts pages in an image file.""" 
     
    5252        try : 
    5353            while True : 
    54                 index += 1               
     54                index += 1 
    5555                image.seek(index) 
    56         except EOFError :         
     56        except EOFError : 
    5757            pass 
    58         return index     
     58        return index