mfenniak / pyPdf

Pure-Python PDF Library; this repository is no longer maintained, please see https://github.com/knowah/PyPDF2/ insead.
https://github.com/knowah/PyPDF2/
Other
275 stars 87 forks source link

pypy compatibility #31

Open tomaszputon opened 12 years ago

tomaszputon commented 12 years ago

Hi, Today I've installed pyPdf 1.13 for PyPy 1.6 using easy_install. It doesn't work, but the bug fix is increadibly simple. Just change line 200 of pyPdf/generic.py.

original one: int.init(value)

bug fix: super(int, self).init(value)

Sorry for not directly contributing patch, but I'm new to github.

BTW, the error that I got was:

Traceback (most recent call last): File "app_main.py", line 53, in run_toplevel File "crack_passwd.py", line 11, in reader = PdfFileReader(file('ZAJECIA5-PRZYROWNANIE_SEKWENCJI.pdf', 'rb')) File "/Users/tomek/pypy-1.6/site-packages/pyPdf/pdf.py", line 374, in init self.read(stream) File "/Users/tomek/pypy-1.6/site-packages/pyPdf/pdf.py", line 732, in read num = readObject(stream, self) File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 87, in readObject return NumberObject.readFromStream(stream) File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 236, in readFromStream return NumberObject(name) File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 220, in init int.init(value)

Now it's fixed!!!

Cheers, paparazzo

bored-engineer commented 10 years ago

Updates on this?