problem with read() write()

Terry Reedy tjreedy at udel.edu
Sat Oct 31 15:11:08 EDT 2009


Zeynel wrote:
> On Oct 31, 10:40 am, "Alf P. Steinbach" <al... at start.no> wrote:
> Thanks! This works. But I need to close the file before read and open
> it again with "r", otherwise I get the garbage again. Can you give me
> the link where you got this in documentation:
> 
> "The mode 'w+' opens and truncates the file to 0 bytes, while 'r+'
> opens the
>>     file without truncation."
> 
> Only place i could find it was in this bug report: http://bugs.python.org/issue5061

LibRef / builtin functions /open
The entry is a full page.

Get familiar with this section and the Built-in Types section.

Terry Jan Reedy




More information about the Python-list mailing list