用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](os.xhtml "os --- 操作系统接口模块") | - [上一页](secrets.xhtml "secrets --- Generate secure random numbers for managing secrets") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | # 通用操作系统服务 本章中描述的各模块提供了在(几乎)所有的操作系统上可用的操作系统特性的接口,例如文件和时钟。这些接口通常以 Unix 或 C 接口为参照对象设计,不过在大多数其他系统上也可用。这里有一个概述: - [`os` --- 操作系统接口模块](os.xhtml) - [文件名,命令行参数,以及环境变量。](os.xhtml#file-names-command-line-arguments-and-environment-variables) - [进程参数](os.xhtml#process-parameters) - [创建文件对象](os.xhtml#file-object-creation) - [文件描述符操作](os.xhtml#file-descriptor-operations) - [Querying the size of a terminal](os.xhtml#querying-the-size-of-a-terminal) - [Inheritance of File Descriptors](os.xhtml#inheritance-of-file-descriptors) - [Files and Directories](os.xhtml#files-and-directories) - [Linux extended attributes](os.xhtml#linux-extended-attributes) - [Process Management](os.xhtml#process-management) - [Interface to the scheduler](os.xhtml#interface-to-the-scheduler) - [Miscellaneous System Information](os.xhtml#miscellaneous-system-information) - [Random numbers](os.xhtml#random-numbers) - [`io` --- 处理流的核心工具](io.xhtml) - [概述](io.xhtml#overview) - [Text I/O](io.xhtml#text-i-o) - [Binary I/O](io.xhtml#binary-i-o) - [Raw I/O](io.xhtml#raw-i-o) - [High-level Module Interface](io.xhtml#high-level-module-interface) - [In-memory streams](io.xhtml#in-memory-streams) - [Class hierarchy](io.xhtml#class-hierarchy) - [I/O Base Classes](io.xhtml#i-o-base-classes) - [Raw File I/O](io.xhtml#raw-file-i-o) - [Buffered Streams](io.xhtml#buffered-streams) - [Text I/O](io.xhtml#id1) - [性能](io.xhtml#performance) - [Binary I/O](io.xhtml#id2) - [Text I/O](io.xhtml#id3) - [多线程](io.xhtml#multi-threading) - [Reentrancy](io.xhtml#reentrancy) - [`time` --- 时间的访问和转换](time.xhtml) - [函数](time.xhtml#functions) - [Clock ID 常量](time.xhtml#clock-id-constants) - [时区常量](time.xhtml#timezone-constants) - [`argparse` --- 命令行选项、参数和子命令解析器](argparse.xhtml) - [示例](argparse.xhtml#example) - [创建一个解析器](argparse.xhtml#creating-a-parser) - [添加参数](argparse.xhtml#adding-arguments) - [解析参数](argparse.xhtml#parsing-arguments) - [ArgumentParser 对象](argparse.xhtml#argumentparser-objects) - [prog](argparse.xhtml#prog) - [usage](argparse.xhtml#usage) - [description](argparse.xhtml#description) - [epilog](argparse.xhtml#epilog) - [parents](argparse.xhtml#parents) - [formatter\_class](argparse.xhtml#formatter-class) - [prefix\_chars](argparse.xhtml#prefix-chars) - [fromfile\_prefix\_chars](argparse.xhtml#fromfile-prefix-chars) - [argument\_default](argparse.xhtml#argument-default) - [allow\_abbrev](argparse.xhtml#allow-abbrev) - [conflict\_handler](argparse.xhtml#conflict-handler) - [add\_help](argparse.xhtml#add-help) - [add\_argument() 方法](argparse.xhtml#the-add-argument-method) - [name or flags](argparse.xhtml#name-or-flags) - [action](argparse.xhtml#action) - [nargs](argparse.xhtml#nargs) - [const](argparse.xhtml#const) - [default](argparse.xhtml#default) - [type](argparse.xhtml#type) - [choices](argparse.xhtml#choices) - [required](argparse.xhtml#required) - [help](argparse.xhtml#help) - [metavar](argparse.xhtml#metavar) - [dest](argparse.xhtml#dest) - [Action classes](argparse.xhtml#action-classes) - [The parse\_args() method](argparse.xhtml#the-parse-args-method) - [Option value syntax](argparse.xhtml#option-value-syntax) - [Invalid arguments](argparse.xhtml#invalid-arguments) - [Arguments containing `-`](argparse.xhtml#arguments-containing) - [Argument abbreviations (prefix matching)](argparse.xhtml#argument-abbreviations-prefix-matching) - [Beyond `sys.argv`](argparse.xhtml#beyond-sys-argv) - [The Namespace object](argparse.xhtml#the-namespace-object) - [Other utilities](argparse.xhtml#other-utilities) - [Sub-commands](argparse.xhtml#sub-commands) - [FileType objects](argparse.xhtml#filetype-objects) - [Argument groups](argparse.xhtml#argument-groups) - [Mutual exclusion](argparse.xhtml#mutual-exclusion) - [Parser defaults](argparse.xhtml#parser-defaults) - [Printing help](argparse.xhtml#printing-help) - [Partial parsing](argparse.xhtml#partial-parsing) - [Customizing file parsing](argparse.xhtml#customizing-file-parsing) - [Exiting methods](argparse.xhtml#exiting-methods) - [Intermixed parsing](argparse.xhtml#intermixed-parsing) - [Upgrading optparse code](argparse.xhtml#upgrading-optparse-code) - [`getopt` --- C-style parser for command line options](getopt.xhtml) - [模块 `logging` --- Python 的日志记录工具](logging.xhtml) - [Logger Objects](logging.xhtml#logger-objects) - [日志级别](logging.xhtml#logging-levels) - [Handler Objects](logging.xhtml#handler-objects) - [Formatter Objects](logging.xhtml#formatter-objects) - [Filter Objects](logging.xhtml#filter-objects) - [LogRecord Objects](logging.xhtml#logrecord-objects) - [LogRecord attributes](logging.xhtml#logrecord-attributes) - [LoggerAdapter Objects](logging.xhtml#loggeradapter-objects) - [线程安全](logging.xhtml#thread-safety) - [模块级别函数](logging.xhtml#module-level-functions) - [Module-Level Attributes](logging.xhtml#module-level-attributes) - [Integration with the warnings module](logging.xhtml#integration-with-the-warnings-module) - [`logging.config` --- 日志记录配置](logging.config.xhtml) - [Configuration functions](logging.config.xhtml#configuration-functions) - [Configuration dictionary schema](logging.config.xhtml#configuration-dictionary-schema) - [Dictionary Schema Details](logging.config.xhtml#dictionary-schema-details) - [Incremental Configuration](logging.config.xhtml#incremental-configuration) - [Object connections](logging.config.xhtml#object-connections) - [User-defined objects](logging.config.xhtml#user-defined-objects) - [Access to external objects](logging.config.xhtml#access-to-external-objects) - [Access to internal objects](logging.config.xhtml#access-to-internal-objects) - [Import resolution and custom importers](logging.config.xhtml#import-resolution-and-custom-importers) - [Configuration file format](logging.config.xhtml#configuration-file-format) - [`logging.handlers` --- Logging handlers](logging.handlers.xhtml) - [StreamHandler](logging.handlers.xhtml#streamhandler) - [FileHandler](logging.handlers.xhtml#filehandler) - [NullHandler](logging.handlers.xhtml#nullhandler) - [WatchedFileHandler](logging.handlers.xhtml#watchedfilehandler) - [BaseRotatingHandler](logging.handlers.xhtml#baserotatinghandler) - [RotatingFileHandler](logging.handlers.xhtml#rotatingfilehandler) - [TimedRotatingFileHandler](logging.handlers.xhtml#timedrotatingfilehandler) - [SocketHandler](logging.handlers.xhtml#sockethandler) - [DatagramHandler](logging.handlers.xhtml#datagramhandler) - [SysLogHandler](logging.handlers.xhtml#sysloghandler) - [NTEventLogHandler](logging.handlers.xhtml#nteventloghandler) - [SMTPHandler](logging.handlers.xhtml#smtphandler) - [MemoryHandler](logging.handlers.xhtml#memoryhandler) - [HTTPHandler](logging.handlers.xhtml#httphandler) - [QueueHandler](logging.handlers.xhtml#queuehandler) - [QueueListener](logging.handlers.xhtml#queuelistener) - [`getpass` --- 便携式密码输入工具](getpass.xhtml) - [`curses` --- 终端字符单元显示的处理](curses.xhtml) - [函数](curses.xhtml#functions) - [Window Objects](curses.xhtml#window-objects) - [常量](curses.xhtml#constants) - [`curses.textpad` --- Text input widget for curses programs](curses.xhtml#module-curses.textpad) - [文本框对象](curses.xhtml#textbox-objects) - [`curses.ascii` --- Utilities for ASCII characters](curses.ascii.xhtml) - [`curses.panel` --- A panel stack extension for curses](curses.panel.xhtml) - [函数](curses.panel.xhtml#functions) - [Panel Objects](curses.panel.xhtml#panel-objects) - [`platform` --- Access to underlying platform's identifying data](platform.xhtml) - [Cross Platform](platform.xhtml#cross-platform) - [Java Platform](platform.xhtml#java-platform) - [Windows Platform](platform.xhtml#windows-platform) - [Win95/98 specific](platform.xhtml#win95-98-specific) - [Mac OS Platform](platform.xhtml#mac-os-platform) - [Unix Platforms](platform.xhtml#unix-platforms) - [`errno` --- Standard errno system symbols](errno.xhtml) - [`ctypes` --- Python 的外部函数库](ctypes.xhtml) - [ctypes 教程](ctypes.xhtml#ctypes-tutorial) - [载入动态连接库](ctypes.xhtml#loading-dynamic-link-libraries) - [操作导入的动态链接库中的函数](ctypes.xhtml#accessing-functions-from-loaded-dlls) - [调用函数](ctypes.xhtml#calling-functions) - [基础数据类型](ctypes.xhtml#fundamental-data-types) - [调用函数,继续](ctypes.xhtml#calling-functions-continued) - [使用自定义的数据类型调用函数](ctypes.xhtml#calling-functions-with-your-own-custom-data-types) - [Specifying the required argument types (function prototypes)](ctypes.xhtml#specifying-the-required-argument-types-function-prototypes) - [Return types](ctypes.xhtml#return-types) - [Passing pointers (or: passing parameters by reference)](ctypes.xhtml#passing-pointers-or-passing-parameters-by-reference) - [Structures and unions](ctypes.xhtml#structures-and-unions) - [Structure/union alignment and byte order](ctypes.xhtml#structure-union-alignment-and-byte-order) - [Bit fields in structures and unions](ctypes.xhtml#bit-fields-in-structures-and-unions) - [Arrays](ctypes.xhtml#arrays) - [Pointers](ctypes.xhtml#pointers) - [Type conversions](ctypes.xhtml#type-conversions) - [Incomplete Types](ctypes.xhtml#incomplete-types) - [Callback functions](ctypes.xhtml#callback-functions) - [Accessing values exported from dlls](ctypes.xhtml#accessing-values-exported-from-dlls) - [Surprises](ctypes.xhtml#surprises) - [Variable-sized data types](ctypes.xhtml#variable-sized-data-types) - [ctypes reference](ctypes.xhtml#ctypes-reference) - [Finding shared libraries](ctypes.xhtml#finding-shared-libraries) - [Loading shared libraries](ctypes.xhtml#loading-shared-libraries) - [Foreign functions](ctypes.xhtml#foreign-functions) - [Function prototypes](ctypes.xhtml#function-prototypes) - [Utility functions](ctypes.xhtml#utility-functions) - [Data types](ctypes.xhtml#data-types) - [基础数据类型](ctypes.xhtml#ctypes-fundamental-data-types-2) - [Structured data types](ctypes.xhtml#structured-data-types) - [Arrays and pointers](ctypes.xhtml#arrays-and-pointers) ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](os.xhtml "os --- 操作系统接口模块") | - [上一页](secrets.xhtml "secrets --- Generate secure random numbers for managing secrets") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。