通用作業系統服務¶
此章節所描述的模組 (module) 提供了作業系統特性的使用介面,例如檔案與時鐘,(幾乎)在所有作業系統上皆能使用。這些介面通常是參考 Unix 或 C 的介面來實作,不過在其他大多數系統上也能使用。以下為概述:
os--- 各種作業系統介面io— 處理資料串流的核心工具time--- 時間存取與轉換logging--- Python 的日誌記錄工具logging.config--- 日誌記錄配置logging.handlers--- 日誌紀錄處理器platform--- 對底層平臺識別資料的存取errno--- 標準 errno 系統符號ctypes--- 用於 Python 的外部函式庫- ctypes 教學
- Loading dynamic link libraries
 - Accessing functions from loaded dlls
 - 呼叫函式
 - 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
 - Passing pointers (or: passing parameters by reference)
 - Structures and unions
 - Structure/union layout, alignment and byte order
 - Bit fields in structures and unions
 - Arrays
 - 指標
 - Thread safety without the GIL
 - Type conversions
 - Incomplete Types
 - 回呼函式
 - Accessing values exported from dlls
 - Surprises
 - Variable-sized data types
 
 - ctypes reference
 
- ctypes 教學