[BioPython] Error for running of ReportLab test on Mac OS X

Peter biopython at maubp.freeserve.co.uk
Fri Sep 28 16:28:28 UTC 2007


Y Tu wrote:
> I just installed ReportLab on Mac OS X and the test with command
> "from reportlab.graphics import renderPDF" succeeded. However, when I
> run the test script (reportlab/test/test_pdfgen_general.py), I got the
> following error. How to fix the problem.

I would guess you have not installed PIL, the Python Imaging Library, 
which ReportLab uses.

 > Another question is how to
> run the script under the python prompt (>>>) after importing the
> script by "import test_pdfgen_general.py". Thank you very much.

To run a python script, like "test_pdfgen_general.py", at the command 
line type:

python test_pdfgen_general.py

(assuming python is on the path, and example.py is in the current directory)

In general there are two sorts of python files, scripts which you run 
(like test_pdfgen_general.py) and library modules you import.

Peter




More information about the Biopython mailing list