通用作業系統服務
****************

此章節所描述的模組 (module) 提供了作業系統特性的使用介面，例如檔案與時
鐘，（幾乎）在所有作業系統上皆能使用。這些介面通常是參考 Unix 或 C 的
介面來實作，不過在其他大多數系統上也能使用。以下為概述：

* "os" --- 各種作業系統介面

  * File Names, Command Line Arguments, and Environment Variables

  * Python UTF-8 模式

  * 行程參數

  * File Object Creation

  * File Descriptor Operations

    * Querying the size of a terminal

    * Inheritance of File Descriptors

  * Files and Directories

    * Timer File Descriptors

    * Linux extended attributes

  * 行程管理

  * 排程器介面

  * Miscellaneous System Information

  * Random numbers

* "io" — 處理資料串流的核心工具

  * 總覽

    * 文字 I/O

    * 二進位 (Binary) I/O

    * 原始 (Raw) I/O

  * 文字編碼

    * 選擇性加入的編碼警告

  * 高階模組介面

  * 類別階層

    * I/O 基礎類別

    * 原始檔案 I/O

    * Buffered Streams

    * 文字 I/O

  * Performance

    * 二進位 (Binary) I/O

    * 文字 I/O

    * Multi-threading

    * Reentrancy

* "time" --- 時間存取與轉換

  * 函式

  * 時鐘 ID 常數

  * 時區常數

* "logging" --- Python 的日誌記錄工具

  * Logger 物件

  * Logging Levels

  * Handler Objects

  * Formatter Objects

  * Filter Objects

  * LogRecord 物件

  * LogRecord 屬性

  * LoggerAdapter 物件

  * 執行緒安全

  * 模組層級函式

  * 模組層級屬性

  * Integration with the warnings module

* "logging.config" --- 日誌記錄配置

  * Configuration functions

  * Security considerations

  * Configuration dictionary schema

    * Dictionary Schema Details

    * Incremental Configuration

    * Object connections

    * User-defined objects

    * Handler configuration order

    * Access to external objects

    * Access to internal objects

    * Import resolution and custom importers

    * Configuring QueueHandler and QueueListener

  * Configuration file format

* "logging.handlers" --- 日誌紀錄處理器

  * StreamHandler

  * FileHandler

  * NullHandler

  * WatchedFileHandler

  * BaseRotatingHandler

  * RotatingFileHandler

  * TimedRotatingFileHandler

  * SocketHandler

  * DatagramHandler

  * SysLogHandler

  * NTEventLogHandler

  * SMTPHandler

  * MemoryHandler

  * HTTPHandler

  * QueueHandler

  * QueueListener

* "platform" ---  對底層平臺識別資料的存取

  * 跨平台

  * Java 平台

  * Windows 平台

  * macOS 平台

  * iOS 平台

  * Unix 平台

  * Linux 平台

  * Android 平台

  * 命令列用法

* "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 alignment and byte order

    * Bit fields in structures and unions

    * Arrays

    * 指標

    * Type conversions

    * Incomplete Types

    * 回呼函式

    * Accessing values exported from dlls

    * Surprises

    * Variable-sized data types

  * ctypes reference

    * Finding shared libraries

    * Loading shared libraries

    * Foreign functions

    * Function prototypes

    * Utility functions

    * Data types

    * Fundamental data types

    * Structured data types

    * Arrays and pointers
