@@ -1094,8 +1094,16 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
10941094 All platforms support sockets as *out * file descriptor, and some platforms
10951095 allow other types (e.g. regular file, pipe) as well.
10961096
1097+ Cross-platform applications should not use *headers *, *trailers * and *flags *
1098+ arguments.
1099+
10971100 Availability: Unix.
10981101
1102+ .. note ::
1103+
1104+ For a higher-level wrapper of :func: `sendfile `, see
1105+ :mod: `socket.socket.sendfile `.
1106+
10991107 .. versionadded :: 3.3
11001108
11011109
@@ -2836,10 +2844,27 @@ written in Python, such as a mail server's external command delivery program.
28362844 Availability: Unix.
28372845
28382846
2839- .. function :: popen(...)
2847+ .. function :: popen(command, mode='r', buffering=-1)
2848+
2849+ Open a pipe to or from *command *. The return value is an open file object
2850+ connected to the pipe, which can be read or written depending on whether *mode *
2851+ is ``'r' `` (default) or ``'w' ``. The *buffering * argument has the same meaning as
2852+ the corresponding argument to the built-in :func: `open ` function. The
2853+ returned file object reads or writes text strings rather than bytes.
2854+
2855+ The ``close `` method returns :const: `None ` if the subprocess exited
2856+ successfully, or the subprocess's return code if there was an
2857+ error. On POSIX systems, if the return code is positive it
2858+ represents the return value of the process left-shifted by one
2859+ byte. If the return code is negative, the process was terminated
2860+ by the signal given by the negated value of the return code. (For
2861+ example, the return value might be ``- signal.SIGKILL `` if the
2862+ subprocess was killed.) On Windows systems, the return value
2863+ contains the signed integer return code from the child process.
28402864
2841- Run child processes, returning opened pipes for communications. These functions
2842- are described in section :ref: `os-newstreams `.
2865+ This is implemented using :class: `subprocess.Popen `; see that class's
2866+ documentation for more powerful ways to manage and communicate with
2867+ subprocesses.
28432868
28442869
28452870.. function :: spawnl(mode, path, ...)
0 commit comments