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 interfaces -
io
— Core tools for working with streams -
time
— Time access and conversions -
argparse
— Parser for command-line options, arguments and sub-commands getopt
— C-style parser for command line options-
logging
— Logging facility for Python -
logging.config
— Logging configuration -
logging.handlers
— Logging handlers getpass
— Portable password input-
curses
— Terminal handling for character-cell displays -
curses.textpad
— Text input widget for curses programs curses.ascii
— Utilities for ASCII characters-
curses.panel
— A panel stack extension for curses -
platform
— Access to underlying platform’s identifying data errno
— Standard errno system symbols-
ctypes
— 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 functions with your own custom data types
- Specifying the required argument types (function prototypes)
- Return types
- Passing pointers (or: passing parameters by reference)
- Structures and unions
- Structure/union alignment and byte order
- Bit fields in structures and unions
- Arrays
- Pointers
- Type conversions
- Incomplete Types
- Callback functions
- Accessing values exported from dlls
- Surprises
- Variable-sized data types
- ctypes reference
-
ctypes tutorial
© 2001–2021 Python Software Foundation
Licensed under the PSF License.
https://docs.python.org/3.10/library/allos.html