用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](pathlib.xhtml "pathlib --- 面向对象的文件系统路径") | - [上一页](operator.xhtml "operator --- 标准运算符替代函数") | - ![](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); | # 文件和目录访问 本章中描述的模块处理磁盘文件和目录。 例如,有一些模块用于读取文件的属性,以可移植的方式操作路径以及创建临时文件。 本章的完整模块列表如下: - [`pathlib` --- 面向对象的文件系统路径](pathlib.xhtml) - [基础使用](pathlib.xhtml#basic-use) - [纯路径](pathlib.xhtml#pure-paths) - [通用性质](pathlib.xhtml#general-properties) - [运算符](pathlib.xhtml#operators) - [访问个别部分](pathlib.xhtml#accessing-individual-parts) - [方法和特征属性](pathlib.xhtml#methods-and-properties) - [具体路径](pathlib.xhtml#concrete-paths) - [方法](pathlib.xhtml#methods) - [对应的 `os` 模块的工具](pathlib.xhtml#correspondence-to-tools-in-the-os-module) - [`os.path` --- 常见路径操作](os.path.xhtml) - [`fileinput` --- Iterate over lines from multiple input streams](fileinput.xhtml) - [`stat` --- Interpreting `stat()` results](stat.xhtml) - [`filecmp` --- File and Directory Comparisons](filecmp.xhtml) - [The `dircmp` class](filecmp.xhtml#the-dircmp-class) - [`tempfile` --- Generate temporary files and directories](tempfile.xhtml) - [示例](tempfile.xhtml#examples) - [Deprecated functions and variables](tempfile.xhtml#deprecated-functions-and-variables) - [`glob` --- Unix style pathname pattern expansion](glob.xhtml) - [`fnmatch` --- Unix filename pattern matching](fnmatch.xhtml) - [`linecache` --- Random access to text lines](linecache.xhtml) - [`shutil` --- High-level file operations](shutil.xhtml) - [Directory and files operations](shutil.xhtml#directory-and-files-operations) - [copytree example](shutil.xhtml#copytree-example) - [rmtree example](shutil.xhtml#rmtree-example) - [Archiving operations](shutil.xhtml#archiving-operations) - [Archiving example](shutil.xhtml#archiving-example) - [Querying the size of the output terminal](shutil.xhtml#querying-the-size-of-the-output-terminal) - [`macpath` --- Mac OS 9 路径操作函数](macpath.xhtml) 参见 模块 [`os`](os.xhtml#module-os "os: Miscellaneous operating system interfaces.")操作系统接口,包括处理比 Python [文件对象](../glossary.xhtml#term-file-object) 更低级别文件的功能。 模块 [`io`](io.xhtml#module-io "io: Core tools for working with streams.")Python的内置 I/O 库,包括抽象类和一些具体的类,如文件 I/O 。 内置函数 [`open()`](functions.xhtml#open "open")使用 Python 打开文件进行读写的标准方法。 ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](pathlib.xhtml "pathlib --- 面向对象的文件系统路径") | - [上一页](operator.xhtml "operator --- 标准运算符替代函数") | - ![](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 创建。