Chapter 9. Files and Input/Output

Chapter Topics

  • File Objects

    • File Built-in Function

    • File Built-in Methods

    • File Built-in Attributes

  • Standard Files

  • Command-line Arguments

  • File System

  • File Execution

  • Persistent Storage

  • Related Modules

This chapter is intended to give you an in-depth introduction on the use of files and related input/output capabilities of Python. We introduce the file object (its built-in function, and built-in methods and attributes), review the standard files, discuss accessing the file system, hint at file execution, and briefly mention persistent storage and modules in the standard library related to “file-mania.”

Get Core Python Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.