Stefan Sonnenberg-Carstens added the comment: I can confirm that under Linux (Linux nx6310 2.6.22-1-mepis-smp #1 SMP PREEMPT Wed Sep 5 22:23:08 EDT 2007 i686 GNU/Linux, SimplyMepis 7.0b3) 1. using Python 3.0a1 is _very_ slow 2. it eats all your cpu (see my post) I did not take the time to wait for the program to finish with 3.0a1, as my patience is limited. I don't think it would silently drop lines, as the windows version.
To see if flushing matters, I'll try this later: import sys print(sys.version_info) import time print (time.strftime('%Y-%m-%d %H:%M:%S')) liste=[] start = time.time() fichout=open('test.txt','w') for i in xrange(85014961): if i%5000000==0 and i>0: print (i,time.time()-start) fichout.write(str(i)+' '*59+'\n') fishout.flush() fichout.close() print ('total lines written ',i) print (i,time.time()-start) print ('*'*50) fichin=open('test.txt') start3 = time.time() for i,li in enumerate(fichin): if i%5000000==0 and i>0: print (i,time.time()-start3) fichin.close() print ('total lines read ',i) print(time.time()-start) I've seen a case lately on Windows XP SP2 with Python 2.3, where a college of mine wrote some files he read from a zip file to disk. Before the close() he also had to flush() the written files explicitly, otherwise he was not able to rename them afterwards. His first approach was time.sleep(30), which was not an option. I'll come back, if I ran the code under Windows. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1142> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com