mirror of https://github.com/python/cpython
Add an x-ref to where the O_ constants are documented and move the SEEK_ constants after lseek().
This commit is contained in:
parent
ea56710cda
commit
6c50efe76b
|
@ -643,6 +643,16 @@ as internal buffering of data.
|
||||||
the file. Availability: Unix, Windows.
|
the file. Availability: Unix, Windows.
|
||||||
|
|
||||||
|
|
||||||
|
.. data:: SEEK_SET
|
||||||
|
SEEK_CUR
|
||||||
|
SEEK_END
|
||||||
|
|
||||||
|
Parameters to the :func:`lseek` function. Their values are 0, 1, and 2,
|
||||||
|
respectively. Availability: Windows, Unix.
|
||||||
|
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
|
||||||
|
|
||||||
.. function:: open(file, flags[, mode])
|
.. function:: open(file, flags[, mode])
|
||||||
|
|
||||||
Open the file *file* and set various flags according to *flags* and possibly its
|
Open the file *file* and set various flags according to *flags* and possibly its
|
||||||
|
@ -652,7 +662,7 @@ as internal buffering of data.
|
||||||
|
|
||||||
For a description of the flag and mode values, see the C run-time documentation;
|
For a description of the flag and mode values, see the C run-time documentation;
|
||||||
flag constants (like :const:`O_RDONLY` and :const:`O_WRONLY`) are defined in
|
flag constants (like :const:`O_RDONLY` and :const:`O_WRONLY`) are defined in
|
||||||
this module too (see below).
|
this module too (see :ref:`open-constants`).
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@ -725,6 +735,12 @@ as internal buffering of data.
|
||||||
:func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use its
|
:func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use its
|
||||||
:meth:`~file.write` method.
|
:meth:`~file.write` method.
|
||||||
|
|
||||||
|
|
||||||
|
.. _open-constants:
|
||||||
|
|
||||||
|
``open()`` flag constants
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The following constants are options for the *flags* parameter to the
|
The following constants are options for the *flags* parameter to the
|
||||||
:func:`~os.open` function. They can be combined using the bitwise OR operator
|
:func:`~os.open` function. They can be combined using the bitwise OR operator
|
||||||
``|``. Some of them are not available on all platforms. For descriptions of
|
``|``. Some of them are not available on all platforms. For descriptions of
|
||||||
|
@ -776,16 +792,6 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
|
||||||
the C library.
|
the C library.
|
||||||
|
|
||||||
|
|
||||||
.. data:: SEEK_SET
|
|
||||||
SEEK_CUR
|
|
||||||
SEEK_END
|
|
||||||
|
|
||||||
Parameters to the :func:`lseek` function. Their values are 0, 1, and 2,
|
|
||||||
respectively. Availability: Windows, Unix.
|
|
||||||
|
|
||||||
.. versionadded:: 2.5
|
|
||||||
|
|
||||||
|
|
||||||
.. _os-file-dir:
|
.. _os-file-dir:
|
||||||
|
|
||||||
Files and Directories
|
Files and Directories
|
||||||
|
|
Loading…
Reference in New Issue