File Descriptor Modes

Fredrik Lundh fredrik at pythonware.com
Tue Mar 20 16:17:32 EST 2001


O'Rourke Clodagh wrote:
> Does anyone where I would find a summary of the different
> modes it is possible to open a file descriptor in?

how about the library reference, under builtin functions?

http://www.python.org/doc/current/lib/built-in-funcs.html
=> open

summary: "r" opens for reading, "w" opens for writing
(zapping an existing file), and "a" opens for appending.
add a "+" to open for reading and writing (use "r+" to
update an existing file), and add a "b" to open in binary
mode.

Cheers /F





More information about the Python-list mailing list