summaryrefslogtreecommitdiff
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-07-07 14:35:02 -0500
committerZachary Ware <zachary.ware@gmail.com>2014-07-07 14:35:02 -0500
commite55c07614b4f6d4961a2d3fc9af4cf92c2b2615c (patch)
tree6eabbaa47b0066ea2480864b78e69c645daed3da /Doc/library/os.rst
parentbb715c3208e98a5abf245de2fcfd7e93e28614e0 (diff)
parent8eb1f397f7637f49e102198ef49e156e229b09de (diff)
downloadcpython-e55c07614b4f6d4961a2d3fc9af4cf92c2b2615c.tar.gz
Issue #17846: Merge with 3.4
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst39
1 files changed, 36 insertions, 3 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 36dfc89146..9752fb3d1c 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1088,8 +1088,16 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
All platforms support sockets as *out* file descriptor, and some platforms
allow other types (e.g. regular file, pipe) as well.
+ Cross-platform applications should not use *headers*, *trailers* and *flags*
+ arguments.
+
Availability: Unix.
+ .. note::
+
+ For a higher-level wrapper of :func:`sendfile`, see
+ :mod:`socket.socket.sendfile`.
+
.. versionadded:: 3.3
@@ -1891,6 +1899,11 @@ features:
* :attr:`st_gen` - file generation number
* :attr:`st_birthtime` - time of file creation
+ On Windows systems, the following attribute is also available:
+
+ * :attr:`st_file_attributes` - Windows file attribute bits (see the
+ ``FILE_ATTRIBUTE_*`` constants in the :mod:`stat` module)
+
.. note::
The exact meaning and resolution of the :attr:`st_atime`,
@@ -1944,6 +1957,9 @@ features:
and the :attr:`st_atime_ns`, :attr:`st_mtime_ns`,
and :attr:`st_ctime_ns` members.
+ .. versionadded:: 3.5
+ Added the :attr:`st_file_attributes` member on Windows.
+
.. function:: stat_float_times([newvalue])
@@ -2727,10 +2743,27 @@ written in Python, such as a mail server's external command delivery program.
Availability: Unix.
-.. function:: popen(...)
+.. function:: popen(command, mode='r', buffering=-1)
+
+ Open a pipe to or from *command*. The return value is an open file object
+ connected to the pipe, which can be read or written depending on whether *mode*
+ is ``'r'`` (default) or ``'w'``. The *buffering* argument has the same meaning as
+ the corresponding argument to the built-in :func:`open` function. The
+ returned file object reads or writes text strings rather than bytes.
+
+ The ``close`` method returns :const:`None` if the subprocess exited
+ successfully, or the subprocess's return code if there was an
+ error. On POSIX systems, if the return code is positive it
+ represents the return value of the process left-shifted by one
+ byte. If the return code is negative, the process was terminated
+ by the signal given by the negated value of the return code. (For
+ example, the return value might be ``- signal.SIGKILL`` if the
+ subprocess was killed.) On Windows systems, the return value
+ contains the signed integer return code from the child process.
- Run child processes, returning opened pipes for communications. These functions
- are described in section :ref:`os-newstreams`.
+ This is implemented using :class:`subprocess.Popen`; see that class's
+ documentation for more powerful ways to manage and communicate with
+ subprocesses.
.. function:: spawnl(mode, path, ...)