append to a file

emile at fenx.com emile at fenx.com
Mon May 22 16:18:05 EDT 2000


>>> print open.__doc__
open(filename[, mode[, buffering]]) -> file object

Open a file.  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.  Add a 'b' to the mode for binary files.
Add a '+' to the mode to allow simultaneous reading and writing.
If the buffering argument is given, 0 means unbuffered, 1 means line
buffered, and larger numbers specify the buffer size.


Emile van Sebille
emile at fenx.com

Scott Hathaway <slhath at flash.net> wrote in message
news:<zCgW4.23567$wb7.1661168 at news.flash.net>...
> How do I append to a file instead of overwriting it?  I searched on the
> python website and got a hit, but the link was bad.
> 
> Thanks,
> Scott
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list
>




More information about the Python-list mailing list