Lesson 10
I am Your Father
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:
xml.etree.ElementTree- creating and reading XML fileswaveandaifc– reading from and writing to audio filestarfile– reading and writing tar archive fileszipfile– working with ZIP archivesconfigparser– creating and parsing configuration files
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 filesPillow– image reading and manipulation