A simple example from the author suggest doing this (You don't seem to be doing 'file'):
from pyPdf import PdfFileWriter, PdfFileReader
output = PdfFileWriter()
input1 = PdfFileReader(file("jayabal_appt.pdf", "rb"))
Then you can do the following:
output.addPage(input1.getPage(0))
And sure, use a for loop for it, but the author doesn't suggest using extractText.
Just check out the website, the example is rather straight forward: http://pybrary.net/pyPdf/
However
pyPdf is no longer maintained, so I don't recommend using it. The author suggest to check out pyPdf2 instead.
A simple Google search also suggest that you should try pdftotext or pdfminer. There are plenty of examples out there.
Good luck.