Pythonic way to overwrite a file

Tim Wintle tim.wintle at teamrubber.com
Wed Jun 17 18:54:23 EDT 2009


On Wed, 2009-06-17 at 14:26 -0400, Cameron Pulsford wrote:
> This is only supposed to handle text files, so when would reading it
> all into memory become too much for most computers? I'm guessing there
> aren't many source files of too great a size.

I often use python with server log files - 1Tb of plain-text wouldn't
seem too much to me, but it wouldn't fit into ram on many computers ;-)

For source files I wouldn't think it would be a problem - but I agree
with Jean-Michel, I can imagine running an app like yours over hundreds
of source files at once. It wouldn't be nice if I decided to kill the
program half way through and found it had died half way through
processing a file and lost my code!


Tim Wintle




More information about the Python-list mailing list