Changeset 527 for pkpgcounter/trunk/pkpgpdls/pil.py
- Timestamp:
- 11/28/07 18:28:30 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pil.py
r522 r527 23 23 """This modules implements a page counter for image formats supported by the Python Imaging Library.""" 24 24 25 from PIL import Image 25 import pdlparser 26 26 27 import pdlparser 27 try : 28 from PIL import Image 29 except ImportError : 30 sys.stderr.write("ERROR: You MUST install the Python Imaging Library (python-imaging) for pkpgcounter to work.\n") 31 raise pdlparser.PDLParserError, "The Python Imaging Library is missing." 32 28 33 import version 29 34 30 35 class Parser(pdlparser.PDLParser) : 31 36 """A parser for plain text documents.""" 32 totiffcommands = [ 'convert "%(infname)s" "%(outfname)s"' ,33 ]37 totiffcommands = [ 'convert "%(infname)s" "%(outfname)s"' ] 38 required = [ "convert" ] 34 39 def isValid(self) : 35 40 """Returns True if data is an image format supported by PIL, else False."""