Chapter 7: More file handling

Processing more types of files

In our course, we only covered processing text, JSON, Pickle and CSV files. There are also different modules/packages/frameworks for processing other types of files. Here are some as a reference. This is purely for your further information. Use them when you need them! You will not need to use them for your final exam.

Comes with the Python Standard Library:

Third party tools for reading and manipulating different files (you will need to install them separately):

  • PyYAML - to process YAML, which a stripped down version of JSON. Used quite a lot as configuration files. This website also uses PyYAML to generate some of the elements you see (for example, the quizzes are actually written and stored in YAML format).
  • PyPDF2 – PDF toolkit to process PDF files
  • Pillow – image reading and manipulation