Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
992019c0
Commit
992019c0
authored
Jul 24, 2014
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport os.rst documentation from Python 3.5.
parent
6d4f4fec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
Doc/library/os.rst
Doc/library/os.rst
+28
-3
No files found.
Doc/library/os.rst
View file @
992019c0
...
...
@@ -1094,8 +1094,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
...
...
@@ -2836,10 +2844,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, ...)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment