Help with a Python coding question

Emile van Sebille emile at fenx.com
Wed Jan 5 23:02:28 EST 2011


On 1/5/2011 6:24 PM Bubba said...
> Your code only shows the first 488 bytes of the file?
>
>


add 'rb' to the open statement...


 >>> pdflines = open(r'c:\shared\python_book_01.pdf','rb').readlines()
 >>> sps = [0]
 >>> for ii in pdflines: sps.append(sps[-1]+len(ii))

Emile






More information about the Python-list mailing list