Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5097)

Delta Between Two Patch Sets: Doc/library/os.rst

Issue 12196: add pipe2() to the os module
Left Patch Set: Created 1 year, 12 months ago
Right Patch Set: Created 1 year, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/test/test_posix.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 :mod:`os` --- Miscellaneous operating system interfaces 1 :mod:`os` --- Miscellaneous operating system interfaces
2 ======================================================= 2 =======================================================
3 3
4 .. module:: os 4 .. module:: os
5 :synopsis: Miscellaneous operating system interfaces. 5 :synopsis: Miscellaneous operating system interfaces.
6 6
7 7
8 This module provides a portable way of using operating system dependent 8 This module provides a portable way of using operating system dependent
9 functionality. If you just want to read or write a file see :func:`open`, if 9 functionality. If you just want to read or write a file see :func:`open`, if
10 you want to manipulate paths, see the :mod:`os.path` module, and if you want to 10 you want to manipulate paths, see the :mod:`os.path` module, and if you want to
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 1012
1013 1013
1014 .. function:: pipe() 1014 .. function:: pipe()
1015 1015
1016 Create a pipe. Return a pair of file descriptors ``(r, w)`` usable for readi ng 1016 Create a pipe. Return a pair of file descriptors ``(r, w)`` usable for readi ng
1017 and writing, respectively. 1017 and writing, respectively.
1018 1018
1019 Availability: Unix, Windows. 1019 Availability: Unix, Windows.
1020 1020
1021 1021
1022 .. function:: pipe2(flags=0) 1022 .. function:: pipe2(flags)
1023 1023
1024 Create a pipe with *flags* set atomically. 1024 Create a pipe with *flags* set atomically.
1025 *flags* is optional and can be constructed by ORing together zero or more of 1025 *flags* can be constructed by ORing together one or more of these values:
1026 these values: :data:`O_NONBLOCK`, :data:`O_CLOEXEC`. 1026 :data:`O_NONBLOCK`, :data:`O_CLOEXEC`.
1027 Return a pair of file descriptors ``(r, w)`` usable for reading and writing, 1027 Return a pair of file descriptors ``(r, w)`` usable for reading and writing,
1028 respectively. 1028 respectively.
1029 1029
1030 Availability: some flavors of Unix. 1030 Availability: some flavors of Unix.
1031
1032 .. versionadded:: 3.3
1031 1033
1032 1034
1033 .. function:: posix_fallocate(fd, offset, len) 1035 .. function:: posix_fallocate(fd, offset, len)
1034 1036
1035 Ensures that enough disk space is allocated for the file specified by *fd* 1037 Ensures that enough disk space is allocated for the file specified by *fd*
1036 starting from *offset* and continuing for *len* bytes. 1038 starting from *offset* and continuing for *len* bytes.
1037 1039
1038 Availability: Unix. 1040 Availability: Unix.
1039 1041
1040 .. versionadded:: 3.3 1042 .. versionadded:: 3.3
(...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 2862
2861 .. function:: urandom(n) 2863 .. function:: urandom(n)
2862 2864
2863 Return a string of *n* random bytes suitable for cryptographic use. 2865 Return a string of *n* random bytes suitable for cryptographic use.
2864 2866
2865 This function returns random bytes from an OS-specific randomness source. Th e 2867 This function returns random bytes from an OS-specific randomness source. Th e
2866 returned data should be unpredictable enough for cryptographic applications, 2868 returned data should be unpredictable enough for cryptographic applications,
2867 though its exact quality depends on the OS implementation. On a UNIX-like 2869 though its exact quality depends on the OS implementation. On a UNIX-like
2868 system this will query /dev/urandom, and on Windows it will use CryptGenRando m. 2870 system this will query /dev/urandom, and on Windows it will use CryptGenRando m.
2869 If a randomness source is not found, :exc:`NotImplementedError` will be raise d. 2871 If a randomness source is not found, :exc:`NotImplementedError` will be raise d.
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7