Part 4 Manipulating objects and files

 

Python is an object-oriented programming language by design. Its modules, packages, and built-in data types, as well as functions and custom classes and their instances, are all objects. Thus, the common characteristics of objects are an essential topic that every Python user should know well. In this part, we focus on the fundamentals of using objects in Python.

In addition to objects, this part covers reading and processing files, which are the most common data storage mechanisms. As a general-purpose language, Python makes it possible for us to do the following:

  • Read data stored in a file, either as pure text or as comma-delimited data
  • Write data to a file
  • Move, delete, and copy files
  • Obtain the metadata of files, such as modification times