<div>Good ideas, but I've tried them already:</div><div>-No del command, or replacing it with a set-to-null, neither solve my file access problem.</div><div>-PdfFileReader has no close() function, and causes an error.  Weird, but true.</div>
<div>-pdf_handle.close() on the other hand, fails to solve the problem.<br><br><div class="gmail_quote">On Tue, Nov 16, 2010 at 11:25 PM, Dennis Lee Bieber <span dir="ltr"><<a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Tue, 16 Nov 2010 17:37:10 -0800, Brett Bowman <<a href="mailto:bnbowman@gmail.com">bnbowman@gmail.com</a>><br>

declaimed the following in gmane.comp.python.general:<br>
<div class="im"><br>
><br>
> And then I test the result:<br>
>     try:<br>
>         pdf_handle = open(outputFile, "rb")<br>
>         pdf_pypdf = PdfFileReader(pdf_handle)<br>
>         del pdf_pypdf<br>
>         del pdf_handle<br>
>     except Exception, e:<br>
>         return "Unable to open file: %s with error: %s" % (outputFile,<br>
> str(e))<br>
><br>
</div>        You seem enamored of "del", which is something I've only used for<br>
special purposes, and even then rarely -- binding a null object to the<br>
name is just as effective for most uses.<br>
<br>
        While the common Python does garbage collect objects when the<br>
reference count goes to zero, there is no real guarantee of this.<br>
<br>
        I'd replace that<br>
                del pdf_handle<br>
whit<br>
                pdf_handle.close()<br>
<font color="#888888"><br>
--<br>
        Wulfraed                 Dennis Lee Bieber         AF6VN<br>
        <a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>    <a href="HTTP://wlfraed.home.netcom.com/" target="_blank">HTTP://wlfraed.home.netcom.com/</a><br>
</font><div><div></div><div class="h5"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br></div>