Am 17.11.2010 09:16, schrieb Brett Bowman:
> Good ideas, but I've tried them already:
> -No del command, or replacing it with a set-to-null, neither solve my file
> access problem.
> -PdfFileReader has no close() function, and causes an error.  Weird, but
> true.
> -pdf_handle.close() on the other hand, fails to solve the problem.

You have to close the file explicitly, for example with a proper with block.

with open(outputFile, "rb") as fh:
    pdf_pypdf = PdfFileReader(fh)
    # process the PDF file here

Christian

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to