导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python »
  • zh_CN 2.7.16 Documentation »
  • Python 标准库 »

10. 文件和目录访问¶

本章中描述的模块处理磁盘文件和目录。 例如,有一些模块用于读取文件的属性,以可移植的方式操作路径以及创建临时文件。 本章的完整模块列表如下:

  • 10.1. os.path — 常见路径操作
  • 10.2. fileinput — Iterate over lines from multiple input streams
  • 10.3. stat — Interpreting stat() results
  • 10.4. statvfs — Constants used with os.statvfs()
  • 10.5. filecmp — File and Directory Comparisons
    • 10.5.1. The dircmp class
  • 10.6. tempfile — Generate temporary files and directories
  • 10.7. glob — Unix style pathname pattern expansion
  • 10.8. fnmatch — Unix filename pattern matching
  • 10.9. linecache — Random access to text lines
  • 10.10. shutil — High-level file operations
    • 10.10.1. Directory and files operations
      • 10.10.1.1. copytree example
    • 10.10.2. Archiving operations
      • 10.10.2.1. Archiving example
  • 10.11. dircache — Cached directory listings
  • 10.12. macpath — Mac OS 9 路径操作函数

参见

Section File Objects
A description of Python’s built-in file objects.
模块 os
Operating system interfaces, including functions to work with files at a lower level than the built-in file object.

上一个主题

9.9. operator — 标准运算符替代函数

下一个主题

10.1. os.path — 常见路径操作

本页

  • 显示源代码

快速搜索

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python »
  • zh_CN 2.7.16 Documentation »
  • Python 标准库 »
© 版权所有 1990-2019, Python Software Foundation.
Python 软件基金会是一个非盈利组织。 请捐助。
Last updated on 4月 13, 2019. 发现了问题?
使用Sphinx1.8.4 创建。