this should be very simple question, for which I couldn\'t find answer by Google search: How to close file handle opened by pyPDF \"PdfFileReader\" Class
Here is sni
instead using input=PdfFileReader(file(fname, "rb")) create an input stream like this
input=PdfFileReader(file(fname, "rb"))
inputStream=file(fname, "rb") input=PdfFileReader(inputStream)
and when job is done use inputStream.close() then u will be able to call it through os package
inputStream.close()