1. Dinu Gherman
  2. pdfgrid

Commits

Dinu Gherman  committed 43904e6

Simplified detecting presence of pyPdf.

  • Participants
  • Parent commits 2a6e9f8
  • Branches default

Comments (0)

Files changed (1)

File pdfgrid.py

View file
 from cStringIO import StringIO
 
 try:
-    from pyPdf import PdfFileWriter, PdfFileReader
-    from pyPdf.pdf import PageObject, ContentStream
-    from pyPdf.generic import \
-        NameObject, DictionaryObject, ArrayObject, FloatObject
+    import pyPdf
 except ImportError:
     _MSG = "Please install pyPdf first, see http://pybrary.net/pyPdf"
     raise RuntimeError(_MSG)
-
+from pyPdf import PdfFileWriter, PdfFileReader
+from pyPdf.pdf import PageObject, ContentStream
+from pyPdf.generic import \
+    NameObject, DictionaryObject, ArrayObject, FloatObject
 try:
     from pyPdf.pdf import ImmutableSet
 except ImportError: