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

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

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

  * File Names, Command Line Arguments, and Environment Variables

  * Python UTF-8 Mode

  * Process Parameters

  * File Object Creation

  * File Descriptor Operations

    * Querying the size of a terminal

    * Inheritance of File Descriptors

  * Files and Directories

    * Linux extended attributes

  * Process Management

  * Interface to the scheduler

  * Miscellaneous System Information

  * Random numbers

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

  * 總覽

    * 文字 I/O

    * 二進位 (Binary) I/O

    * 原始 (Raw) I/O

  * 文字編碼

    * 選擇性加入的編碼警告

  * 高階模組介面

  * Class hierarchy

    * I/O Base Classes

    * Raw File I/O

    * Buffered Streams

    * 文字 I/O

  * Performance

    * 二進位 (Binary) I/O

    * 文字 I/O

    * Multi-threading

    * Reentrancy

* "time" --- Time access and conversions

  * 函式

  * Clock ID Constants

  * Timezone Constants

* "argparse" --- Parser for command-line options, arguments and sub-
  commands

  * Core Functionality

  * Quick Links for add_argument()

  * 範例

    * 建立一個剖析器

    * 增加引數

    * 剖析引數

  * ArgumentParser 物件

    * prog

    * usage

    * 描述

    * epilog

    * parents

    * formatter_class

    * prefix_chars

    * fromfile_prefix_chars

    * argument_default

    * allow_abbrev

    * conflict_handler

    * add_help

    * exit_on_error

  * The add_argument() method

    * name or flags

    * action

    * nargs

    * const

    * default

    * type

    * choices

    * required

    * 幫助

    * metavar

    * dest

    * Action classes

  * The parse_args() method

    * Option value syntax

    * Invalid arguments

    * Arguments containing "-"

    * Argument abbreviations (prefix matching)

    * Beyond "sys.argv"

    * The Namespace object

  * Other utilities

    * Sub-commands

    * FileType 物件

    * Argument groups

    * Mutual exclusion

    * Parser defaults

    * Printing help

    * Partial parsing

    * Customizing file parsing

    * Exiting methods

    * Intermixed parsing

  * Upgrading optparse code

  * Exceptions

* "getopt" --- C-style parser for command line options

* "logging" --- Logging facility for Python

  * Logger Objects

  * Logging Levels

  * Handler Objects

  * Formatter Objects

  * Filter Objects

  * LogRecord 物件

  * LogRecord attributes

  * LoggerAdapter 物件

  * Thread Safety

  * Module-Level Functions

  * Module-Level Attributes

  * Integration with the warnings module

* "logging.config" --- Logging configuration

  * 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

  * Configuration file format

* "logging.handlers" --- Logging handlers

  * StreamHandler

  * FileHandler

  * NullHandler

  * WatchedFileHandler

  * BaseRotatingHandler

  * RotatingFileHandler

  * TimedRotatingFileHandler

  * SocketHandler

  * DatagramHandler

  * SysLogHandler

  * NTEventLogHandler

  * SMTPHandler

  * MemoryHandler

  * HTTPHandler

  * QueueHandler

  * QueueListener

* "getpass" --- 可攜式密碼輸入工具

* "curses" --- Terminal handling for character-cell displays

  * 函式

  * Window Objects

  * Constants

* "curses.textpad" --- Text input widget for curses programs

  * Textbox objects

* "curses.ascii" --- ASCII 字元的工具程式

* "curses.panel" --- A panel stack extension for curses

  * 函式

  * Panel Objects

* "platform" ---  獲取底層平臺的標識資料

  * 跨平台

  * Java 平台

  * Windows 平台

  * macOS 平台

  * Unix 平台

  * Linux 平台

* "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 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

    * Pointers

    * Type conversions

    * Incomplete Types

    * Callback functions

    * 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
