Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-85984: Add POSIX pseudo-terminal functions.#102413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
65eb9131e4a6adbb14261d2a7fff73a3f4ec99e91bf6dcd5440bad664645976efc94823effe4b2359d1b57acdc3dd6082cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1122,6 +1122,20 @@ as internal buffering of data. | ||
| .. versionchanged:: 3.12 | ||
| Added support for pipes on Windows. | ||
| .. function:: grantpt(fd, /) | ||
| Grant access to the slave pseudo-terminal device associated with the | ||
| master pseudo-terminal device to which the file descriptor *fd* refers. | ||
| The file descriptor *fd* is not closed upon failure. | ||
| Calls the C standard library function :c:func:`grantpt`. | ||
| .. availability:: Unix, not Emscripten, not WASI. | ||
| .. versionadded:: 3.13 | ||
| .. function:: isatty(fd, /) | ||
| Return ``True`` if the file descriptor *fd* is open and connected to a | ||
| @@ -1429,6 +1443,23 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo | ||
| .. versionadded:: 3.3 | ||
| .. function:: posix_openpt(oflag, /) | ||
| Open and return a file descriptor for a master pseudo-terminal device. | ||
| Calls the C standard library function :c:func:`posix_openpt`. The *oflag* | ||
| argument is used to set file status flags and file access modes as | ||
| specified in the manual page of :c:func:`posix_openpt` of your system. | ||
encukou marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| The returned file descriptor is :ref:`non-inheritable <fd_inheritance>`. | ||
| If the value :data:`O_CLOEXEC` is available on the system, it is added to | ||
| *oflag*. | ||
| .. availability:: Unix, not Emscripten, not WASI. | ||
| .. versionadded:: 3.13 | ||
| .. function:: preadv(fd, buffers, offset, flags=0, /) | ||
| Read from a file descriptor *fd* at a position of *offset* into mutable | ||
| @@ -1486,6 +1517,21 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo | ||
| .. versionadded:: 3.7 | ||
| .. function:: ptsname(fd, /) | ||
| Return the name of the slave pseudo-terminal device associated with the | ||
| master pseudo-terminal device to which the file descriptor *fd* refers. | ||
| The file descriptor *fd* is not closed upon failure. | ||
| Calls the reentrant C standard library function :c:func:`ptsname_r` if | ||
| it is available; otherwise, the C standard library function | ||
| :c:func:`ptsname`, which is not guaranteed to be thread-safe, is called. | ||
| .. availability:: Unix, not Emscripten, not WASI. | ||
| .. versionadded:: 3.13 | ||
| .. function:: pwrite(fd, str, offset, /) | ||
| Write the bytestring in *str* to file descriptor *fd* at position of | ||
| @@ -1738,6 +1784,19 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo | ||
| .. availability:: Unix. | ||
| .. function:: unlockpt(fd, /) | ||
| Unlock the slave pseudo-terminal device associated with the master | ||
| pseudo-terminal device to which the file descriptor *fd* refers. | ||
| The file descriptor *fd* is not closed upon failure. | ||
| Calls the C standard library function :c:func:`unlockpt`. | ||
| .. availability:: Unix, not Emscripten, not WASI. | ||
| .. versionadded:: 3.13 | ||
| .. function:: write(fd, str, /) | ||
| Write the bytestring in *str* to file descriptor *fd*. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Add POSIX pseudo-terminal functions :func:`os.posix_openpt`, | ||
| :func:`os.grantpt`, :func:`os.unlockpt`, and :func:`os.ptsname`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.