File and Directory Access文件和目录访问

The modules described in this chapter deal with disk files and directories. 本章介绍的模块处理磁盘文件和目录。For example, there are modules for reading the properties of files, manipulating paths in a portable way, and creating temporary files. 例如,有用于读取文件属性、以可移植方式操纵路径和创建临时文件的模块。The full list of modules in this chapter is:本章模块的完整列表如下:

See also参阅

Module 模块os

Operating system interfaces, including functions to work with files at a lower level than Python file objects.操作系统接口,包括用于在低于Python文件对象的级别上处理文件的函数。

Module 模块io

Python’s built-in I/O library, including both abstract classes and some concrete classes such as file I/O.Python的内置I/O库,包括抽象类和一些具体类,如文件I/O。

Built-in function 内置功能open()

The standard way to open files for reading and writing with Python.用Python打开文件进行读写的标准方法。