On Thursday 22 September 2005 05:52, Nico Grubert wrote: > Does f = open('/tmp/myfile', 'w') overwrite the existing file or > does f.writelines('456') replace the first line in the existing file?
Here's an excerpt from open.__doc__ The mode can be 'r', 'w' or 'a' for reading (default), writing or appending. The file will be created if it doesn't exist when opened for writing or appending; it will be truncated when opened for writing. Tom -- http://mail.python.org/mailman/listinfo/python-list