Within the writers directory, we have two scripts: csv_writer.py and kml_writer.py. Both of these writers are called depending on the types of data being processed in the metadata_parser.py framework.
Moving on to our writers
Writing spreadsheets – csv_writer.py
In this chapter, we'll use csv.DictWriter instead of csv.writer, just like we did in Chapter 5, Databases in Python, and Chapter 6, Extracting Artifacts from Binary Files. As a reminder, the difference is that the DictWriter writes dictionary objects to a CSV file and the csv.writer function is more suited for writing lists.
The great thing about csv.DictWriter is that it requires an argument, fieldnames, when creating the writer object. The fieldnames...