Hi,
I having a problem with reading each line from a text file. For example, the
file is a text file named 'test.txt' with the following content :
line 1
line 2
line 3
line 4
line 5
The following script attempts to print out each line :
datafile ="C:\\Classifie r\Data\\test.tx t"
dataobject = open(datafile," r")
while dataobject.read line() !="":
line = dataobject.read line()
print line
However, the output from this script is :
line 2
line 4
I'm sure this is a simple problem but I can't figure it after loking up
several reference books and web pages. Any help would be greatly
appreciated.
Regards
Peter
_______________ _______________ _______________ _______________ _____
Want to check if your PC is virus-infected? Get a FREE computer virus scan
online from McAfee.
http://clinic.mcafee.com/clinic/ibuy...n.asp?cid=3963