file processing question
Axel Grune
NineOfSix at gmx.de
Mon Sep 2 06:56:08 EDT 2002
Hi, Im trying to read the data of a file with following method
file = open( inputfile, "r")
data = file.read()
file.close()
but 'data' is always smaller then the file size, e.g. I have a file
which is 25677824 bytes but file.read() reads only 4295 (file.tell() =
25677824).
Im using python 2.2 under win2k.
BTW,
file = open( inputfile, "r")
lines = file.readlines()
data = ''join( lines)
file.close()
has the same effect.
TIA,
Axel
More information about the Python-list
mailing list