Operating System Utilities — Python 3.16.0a0 documentation

docs.python.org

Tin mới

Python Module Index

3.16.0a0 Documentation

Python/C API reference manual

os.PathLike.__fspath__

Return the file system representation for path. If the object is a str or bytes object, then a new strong reference is returned. If the object implements the os.PathLike interface, then __fspath__() is returned as long a

PyConfig.interactive

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 PyConfig.interactive is non-zero, this function also ret

“main” interpreter

The C fork() call should only be made from the “main” thread (of the “main” interpreter). The same is true for PyOS_BeforeFork().

PyErr_CheckSignals()

Returns 1 if a SIGINT has occurred and clears the signal flag, or 0 otherwise.

attached thread state

Returns 1 if a SIGINT has occurred and clears the signal flag, or 0 otherwise.

surrogateescape error handler

This function should not be called directly: use the PyConfig API with the PyConfig_SetBytesString() function which ensures that Python is preinitialized.

PyUnicode_DecodeFSDefaultAndSize()

The PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeLocaleAndSize() functions.

sys: Access system-specific parameters and functions.

These are utility functions that make functionality from the sys module accessible to C code. They all work with the current interpreter thread’s sys module’s dict, which is contained in the internal thread state structu

audit events table

Append the callable hook to the list of active auditing hooks. Return zero on success and non-zero on failure. If the runtime has been initialized, also set an error on failure. Hooks added through this API are called fo

PyUnstable_AtExit()

PyUnstable_AtExit() for passing a void *data argument.