gh-77782: Py_FdIsInteractive() now uses PyConfig.interactive (#93916)

This commit is contained in:
Victor Stinner 2022-06-17 15:19:28 +02:00 committed by GitHub
parent c5b750dc0b
commit 1735710873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 23 deletions

View file

@ -21,10 +21,12 @@ Operating System Utilities
Return true (nonzero) if the standard I/O file *fp* with name *filename* is
deemed interactive. This is the case for files for which ``isatty(fileno(fp))``
is true. If the global flag :c:data:`Py_InteractiveFlag` is true, this function
is true. If the :c:member:`PyConfig.interactive` is non-zero, this function
also returns true if the *filename* pointer is ``NULL`` or if the name is equal to
one of the strings ``'<stdin>'`` or ``'???'``.
This function must not be called before Python is initialized.
.. c:function:: void PyOS_BeforeFork()