Re: Cannot Remove File: Device or resource busy

2010-11-17 Thread Christian Heimes
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

Re: Cannot Remove File: Device or resource busy

2010-11-17 Thread 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. On Tue, Nov 16, 2010

Re: Cannot Remove File: Device or resource busy

2010-11-16 Thread MRAB
On 17/11/2010 01:37, Brett Bowman wrote: I'm spawning a subprocess to fix some formating errors with a library of PDFs with pdftk: try: sp = subprocess.Popen('pdftk.exe "%s" output %s' % (pdfFile, outputFile)) sp.wait() del sp except Exception, e: ret

Cannot Remove File: Device or resource busy

2010-11-16 Thread Brett Bowman
I'm spawning a subprocess to fix some formating errors with a library of PDFs with pdftk: try: sp = subprocess.Popen('pdftk.exe "%s" output %s' % (pdfFile, outputFile)) sp.wait() del sp except Exception, e: return "Unable to open file: %s with error: %s" % (p