Navigation
- index
- modules |
- next |
- previous |
- Python »
- 3.16.0a2 documentation »
- The Python standard library »
- Generic Operating System Services
- |
- Theme |
Generic Operating System Services¶
The modules described in this chapter provide interfaces to operating system features that are available on (almost) all operating systems, such as files and a clock. The interfaces are generally modeled after the Unix or C interfaces, but they are available on most other systems as well. Here’s an overview:
os— Miscellaneous operating system interfacesio— Core tools for working with streamstime— Time access and conversionslogging— Logging facility for Pythonlogging.config— Logging configurationlogging.handlers— Logging handlersplatform— Access to underlying platform’s identifying dataerrno— Standard errno system symbolsctypes— A foreign function library for Python- ctypes tutorial
- Loading dynamic link libraries
- Accessing functions from loaded dlls
- Calling functions
- Fundamental data types
- Calling functions, continued
- Calling variadic functions
- Calling functions with your own custom data types
- Specifying the required argument types (function prototypes)
- Return types
- Specifying function pointers using type annotations
- Passing pointers (or: passing parameters by reference)
- Structures and unions
- Structure/union layout, alignment and byte order
- Bit fields in structures and unions
- Arrays
- Pointers
- Thread safety without the GIL
- Type conversions
- Incomplete Types
- Callback functions
- Accessing values exported from dlls
- Surprises
- Variable-sized data types
- ctypes reference
- ctypes tutorial
Previous topic
secrets — Generate secure random numbers for managing secrets
Next topic
os — Miscellaneous operating system interfaces
This page
«Navigation
- index
- modules |
- next |
- previous |
- Python »
- 3.16.0a2 documentation »
- The Python standard library »
- Generic Operating System Services
- |
- Theme |
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.
The Python Software Foundation is a non-profit corporation. Please donate.
Last updated on Nov 29, 2026 (04:54 UTC). Found a bug?
Created using Sphinx 9.1.1.