Message813

Author pedronis
Recipients
Date 2003-01-26.13:08:33
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Consider:

file = open("PrintTest.txt",'w')
item = "some, comma, separated, values"
for i in range(10000):
  print >> file, item
#  file.write(item)
#  file.write('\n')

file.close()


1. it seems that in general we force to write to disk 
instead of simply passing buffer data along to the OS 
each time a buffer is full, isn't that too often?

2. print is implemented so to flush to buffer very often 
(each line (?)), this should be in principle decided by 
the underlying file not at print impl level.


[Workarounds: increase buffer size (?), using file.write 
instead of print ]
History
Date User Action Args
2008-02-20 17:17:13adminlinkissue674932 messages
2008-02-20 17:17:13admincreate