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:
- 16.1.
os
— Miscellaneous operating system interfaces- 16.1.1. File Names, Command Line Arguments, and Environment Variables
- 16.1.2. Process Parameters
- 16.1.3. File Object Creation
- 16.1.4. File Descriptor Operations
- 16.1.5. Files and Directories
- 16.1.6. Process Management
- 16.1.7. Interface to the scheduler
- 16.1.8. Miscellaneous System Information
- 16.1.9. Miscellaneous Functions
- 16.2.
io
— Core tools for working with streams - 16.3.
time
— Time access and conversions - 16.4.
argparse
— Parser for command-line options, arguments and sub-commands - 16.5.
getopt
— C-style parser for command line options - 16.6.
logging
— Logging facility for Python- 16.6.1. Logger Objects
- 16.6.2. Logging Levels
- 16.6.3. Handler Objects
- 16.6.4. Formatter Objects
- 16.6.5. Filter Objects
- 16.6.6. LogRecord Objects
- 16.6.7. LogRecord attributes
- 16.6.8. LoggerAdapter Objects
- 16.6.9. Thread Safety
- 16.6.10. Module-Level Functions
- 16.6.11. Module-Level Attributes
- 16.6.12. Integration with the warnings module
- 16.7.
logging.config
— Logging configuration - 16.8.
logging.handlers
— Logging handlers- 16.8.1. StreamHandler
- 16.8.2. FileHandler
- 16.8.3. NullHandler
- 16.8.4. WatchedFileHandler
- 16.8.5. BaseRotatingHandler
- 16.8.6. RotatingFileHandler
- 16.8.7. TimedRotatingFileHandler
- 16.8.8. SocketHandler
- 16.8.9. DatagramHandler
- 16.8.10. SysLogHandler
- 16.8.11. NTEventLogHandler
- 16.8.12. SMTPHandler
- 16.8.13. MemoryHandler
- 16.8.14. HTTPHandler
- 16.8.15. QueueHandler
- 16.8.16. QueueListener
- 16.9.
getpass
— Portable password input - 16.10.
curses
— Terminal handling for character-cell displays - 16.11.
curses.textpad
— Text input widget for curses programs - 16.12.
curses.ascii
— Utilities for ASCII characters - 16.13.
curses.panel
— A panel stack extension for curses - 16.14.
platform
— Access to underlying platform’s identifying data - 16.15.
errno
— Standard errno system symbols - 16.16.
ctypes
— A foreign function library for Python- 16.16.1. ctypes tutorial
- 16.16.1.1. Loading dynamic link libraries
- 16.16.1.2. Accessing functions from loaded dlls
- 16.16.1.3. Calling functions
- 16.16.1.4. Fundamental data types
- 16.16.1.5. Calling functions, continued
- 16.16.1.6. Calling functions with your own custom data types
- 16.16.1.7. Specifying the required argument types (function prototypes)
- 16.16.1.8. Return types
- 16.16.1.9. Passing pointers (or: passing parameters by reference)
- 16.16.1.10. Structures and unions
- 16.16.1.11. Structure/union alignment and byte order
- 16.16.1.12. Bit fields in structures and unions
- 16.16.1.13. Arrays
- 16.16.1.14. Pointers
- 16.16.1.15. Type conversions
- 16.16.1.16. Incomplete Types
- 16.16.1.17. Callback functions
- 16.16.1.18. Accessing values exported from dlls
- 16.16.1.19. Surprises
- 16.16.1.20. Variable-sized data types
- 16.16.2. ctypes reference
- 16.16.1. ctypes tutorial