Operating System Utilities — Python 3.9.25 documentation

docs.python.org

Table of Contents | Utilities | Importing Modules | Report a Bug | index | modules | Python | 3.9.25 Documentation | Python/C API Reference Manual

Tin mới

Python documentation for the current stable release

Python documentation for the current stable release

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

Python Module Index

3.9.25 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 its reference count is incremented. If the object implements the os.PathLike interface, then __fspath__() is returned as long a

Py_InteractiveFlag

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 Py_InteractiveFlag is true, this function al

surrogateescape error handler

Decode a byte string from the locale encoding with the surrogateescape error handler: undecodable bytes are decoded as characters in range U+DC80..U+DCFF. If a byte sequence can be decoded as a surrogate character, escap

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

warnings: Issue warning messages and control their disposition.

Note: this function is not currently usable from outside the CPython implementation, as it must be called prior to the implicit import of warnings in Py_Initialize() to be effective, but can’t be called until enough of t

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

1 1