[Tutor] Reading big files
Oscar Picasso
picasso@videotron.ca
Mon, 22 Nov 1999 14:21:29 -0500
Hi,
I have a PDF file I want to read. I used the following code.
f=open('D:\\Documents\\MyFile')
If I:
s=f.read()
len(s)
I get 768, the lenght of s. However my file is around 5Mo. I expected he
string s to content all the characters of my files.
If I do :
f=open('D:\\Documents\\MyFile')
l=f.readlines()
len(l)
I get 4. My file is supposed to have several thousand of lines. I expected
l to contain all the lines of the files.
Where I am wrong. Is the file too big. Has it a special character in it
that doesn't allow to read the entire content.
I'm working with python 1.5.2 on Windows98.
Any help appreciated.
******************************************************
Oscar Picasso
picasso@videotron.ca
******************************************************