[Corso Python3] sabato prossimo: come scrivere e leggere file. Su fs ma anche da qualche altra parte.

alessandro medici alexxandro.medici a gmail.com
Gio 16 Giu 2016 00:03:48 CEST


file object

An object exposing a file-oriented API (with methods such as read() or
write()) to an underlying resource. Depending on the way it was created, a
file object can mediate access to a real on-disk file or to another type of
storage or communication device (for example standard input/output,
in-memory buffers, sockets, pipes, etc.). File objects are also called
*file-like
objects* or *streams*.

There are actually three categories of file objects: raw binary files
<https://docs.python.org/3.6/glossary.html#term-binary-file>, buffered binary
files <https://docs.python.org/3.6/glossary.html#term-binary-file> and text
files <https://docs.python.org/3.6/glossary.html#term-text-file>. Their
interfaces are defined in the io
<https://docs.python.org/3.6/library/io.html#module-io> module. The
canonical way to create a file object is by using the open()
<https://docs.python.org/3.6/library/functions.html#open> function.
file-like objectA synonym for file object
<https://docs.python.org/3.6/glossary.html#term-file-object>.
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.fsugpadova.org/pipermail/fsug-corso-python3/attachments/20160616/c764f2b8/attachment.html>


Maggiori informazioni sulla lista fsug-corso-python3