Super Newbie Question

Peter Hansen peter at engcorp.com
Tue Apr 5 09:09:31 EDT 2005


Joey C. wrote:
> To reply to many of your messages (I'm using Google right now due to
> lack of a better newsreader at the moment), the issue with the
> temporary file is that when I write something new to it, if the old
> contents of the file was larger, not all of it will be overwritten.

That's not likely true, unless you're doing something
unusual here.  Are you somehow terminating the process
before it closes the file (and not using flush())?
Or are you opening the file in some kind of "update"
mode (with a "+") instead of just using "w"?  Or
something else?

Or are you just assuming that what you describe will
happen, but haven't actually tried it?

-Peter



More information about the Python-list mailing list