]> granicus.if.org Git - python/commitdiff
Add an x-ref to where the O_ constants are documented and move the SEEK_ constants...
authorGeorg Brandl <georg@python.org>
Wed, 14 Apr 2010 13:50:31 +0000 (13:50 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 14 Apr 2010 13:50:31 +0000 (13:50 +0000)
Doc/library/os.rst

index 11d9607a7d589db86fb4a41a8413c3d1b7505450..0c2cab74a1e40b9268f1041cf5c7c36ef8a19442 100644 (file)
@@ -643,6 +643,16 @@ as internal buffering of data.
    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])
 
    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;
    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::
 
@@ -725,6 +735,12 @@ as internal buffering of data.
       :func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use its
       :meth:`~file.write` method.
 
+
+.. _open-constants:
+
+``open()`` flag constants
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
 The following constants are options for the *flags* parameter to the
 :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
@@ -776,16 +792,6 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
    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:
 
 Files and Directories