Re: file reading anomaly

2007-07-06 Thread Gerry
Final update: problem solved. In the big script, the snippet was reading depstats.txt which hadn't been closed. Sorry for all the bother. Gerry -- http://mail.python.org/mailman/listinfo/python-list

Re: file reading anomaly

2007-07-06 Thread Gerry
Update: The PC seems to not be a factor (same problem exist on two PCs). The entire script does some computation and writes depstats.txt. The code snippet below attempts to read depstats.txt and write another file. When the code below is run stand-alone, it succeeds. When run in-line as p

file reading anomaly

2007-07-06 Thread Gerry
Python 2.5, Windows XP. I have a 48-line text file written by a Windows python script, I try to read it as follows: f = open ("depstats.txt", "r", 0) for index, line in enumerate(f): print index, len(line), len(line.split()) f.close() On one PC, this runs without any problem. On an