通用操作系统服务¶
本章中描述的各模块提供了在(几乎)所有的操作系统上可用的操作系统特性的接口,例如文件和时钟。这些接口通常以 Unix 或 C 接口为参照对象设计,不过在大多数其他系统上也可用。这里有一个概述:
os--- 各种各样的操作系统接口io--- 处理流的核心工具time--- 时间的访问和转换argparse--- 命令行选项、参数和子命令解析器getopt--- C-style parser for command line optionslogging--- Python 的日志记录工具logging.config--- 日志记录配置logging.handlers--- 日志处理getpass--- 便携式密码输入工具curses--- 终端字符单元显示的处理curses.textpad--- Text input widget for curses programscurses.ascii--- Utilities for ASCII characterscurses.panel--- A panel stack extension for cursesplatform--- 获取底层平台的标识数据errno--- Standard errno system symbolsctypes--- Python 的外部函数库- ctypes 教程
- 载入动态连接库
- 操作导入的动态链接库中的函数
- 调用函数
- 基础数据类型
- 调用函数,继续
- 使用自定义的数据类型调用函数
- 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 教程
