append to a file

Scott Hathaway slhath at flash.net
Mon May 22 22:27:07 CEST 2000


Thanks for the quick reply!  I only found w and r as options in the book I
am reading, not a!

Scott

<emile at fenx.com> wrote in message news:392995FD.6659449F at fenx.com...
> >>> 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