summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-15 11:11:28 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-15 11:11:28 (GMT)
commit11cb961b38550443d287b2b55174e504c2309af2 (patch)
tree51b2972800e593dde1b5f5154b9b044058a350d7 /Doc/library/os.rst
parent6a11a98b7c8f576d7663182cbd09123eb108a928 (diff)
downloadcpython-11cb961b38550443d287b2b55174e504c2309af2.zip
cpython-11cb961b38550443d287b2b55174e504c2309af2.tar.gz
cpython-11cb961b38550443d287b2b55174e504c2309af2.tar.bz2
Add cross-references to the glossary entry for file objects.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 9373bda..57a916c 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -526,7 +526,7 @@ process and user.
File Object Creation
--------------------
-These functions create new file objects. (See also :func:`open`.)
+These functions create new :term:`file objects <file object>`. (See also :func:`open`.)
.. function:: fdopen(fd[, mode[, bufsize]])
@@ -562,7 +562,7 @@ is slightly deceptive; on Unix platforms, sockets and pipes are also referenced
by file descriptors.
The :meth:`~file.fileno` method can be used to obtain the file descriptor
-associated with a file object when required. Note that using the file
+associated with a :term:`file object` when required. Note that using the file
descriptor directly will bypass the file object methods, ignoring aspects such
as internal buffering of data.
@@ -679,9 +679,9 @@ as internal buffering of data.
Force write of file with filedescriptor *fd* to disk. On Unix, this calls the
native :cfunc:`fsync` function; on Windows, the MS :cfunc:`_commit` function.
- If you're starting with a Python file object *f*, first do ``f.flush()``, and
- then do ``os.fsync(f.fileno())``, to ensure that all internal buffers associated
- with *f* are written to disk.
+ If you're starting with a buffered Python :term:`file object` *f*, first do
+ ``f.flush()``, and then do ``os.fsync(f.fileno())``, to ensure that all internal
+ buffers associated with *f* are written to disk.
Availability: Unix, and Windows.
@@ -738,9 +738,9 @@ as internal buffering of data.
.. note::
This function is intended for low-level I/O. For normal usage, use the
- built-in function :func:`open`, which returns a "file object" with
+ built-in function :func:`open`, which returns a :term:`file object` with
:meth:`~file.read` and :meth:`~file.write` methods (and many more). To
- wrap a file descriptor in a "file object", use :func:`fdopen`.
+ wrap a file descriptor in a file object, use :func:`fdopen`.
.. function:: openpty()