From: Benjamin Peterson Date: Sun, 19 Jan 2014 03:57:05 +0000 (-0500) Subject: merge 3.3 (#17811) X-Git-Tag: v3.4.0b3~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc3cce077d31b613bee8bc07d9c97bf63a2304f3;p=python merge 3.3 (#17811) --- dc3cce077d31b613bee8bc07d9c97bf63a2304f3 diff --cc Doc/library/os.rst index 32c1563f7a,b11098e95f..1fc8de96c6 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@@ -1103,10 -1019,13 +1103,13 @@@ or `the MSDN ` *buffers*. :func:`~os.readv` will transfer data + into each buffer until it is full and then move on to the next buffer in the + sequence to hold the rest of the data. :func:`~os.readv` returns the total + number of bytes read (which may be less than the total capacity of all the + objects). - + Availability: Unix. .. versionadded:: 3.3 @@@ -1155,11 -1074,84 +1158,12 @@@ .. function:: writev(fd, buffers) - Write the contents of *buffers* to file descriptor *fd*, where *buffers* - is an arbitrary sequence of buffers. - Returns the total number of bytes written. + Write the contents of *buffers* to file descriptor *fd*. *buffers* must be a + sequence of :term:`bytes-like objects `. + :func:`~os.writev` writes the contents of each object to the file descriptor + and returns the total number of bytes written. - - Availability: Unix. - - .. versionadded:: 3.3 - - -.. _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 -their availability and use, consult the :manpage:`open(2)` manual page on Unix -or `the MSDN `_ on Windows. - - -.. data:: O_RDONLY - O_WRONLY - O_RDWR - O_APPEND - O_CREAT - O_EXCL - O_TRUNC - - These constants are available on Unix and Windows. - - -.. data:: O_DSYNC - O_RSYNC - O_SYNC - O_NDELAY - O_NONBLOCK - O_NOCTTY - O_SHLOCK - O_EXLOCK - O_CLOEXEC - - These constants are only available on Unix. - - .. versionchanged:: 3.3 - Add :data:`O_CLOEXEC` constant. -.. data:: O_BINARY - O_NOINHERIT - O_SHORT_LIVED - O_TEMPORARY - O_RANDOM - O_SEQUENTIAL - O_TEXT - - These constants are only available on Windows. - - -.. data:: O_ASYNC - O_DIRECT - O_DIRECTORY - O_NOFOLLOW - O_NOATIME - - These constants are GNU extensions and not present if they are not defined by - the C library. - - -.. data:: RTLD_LAZY - RTLD_NOW - RTLD_GLOBAL - RTLD_LOCAL - RTLD_NODELETE - RTLD_NOLOAD - RTLD_DEEPBIND - - See the Unix manual page :manpage:`dlopen(3)`. + Availability: Unix. .. versionadded:: 3.3