Summary
In this chapter, we discussed file I/O – reading and writing to files, different flags used to read, write, and append to files. We talked about moving file pointers to different points in a file to retrieve specific content or overwrite the contents of a file at a specific location. We discussed the ConfigParser
module in Python and its application in storing/retrieving config parameters for applications along with reading and writing to CSVÂ files.
Finally, we discussed different Python utilities that have a potential use in our project. We will be extensively making use of file I/O and the discussed Python utilities in our final project. We strongly recommend familiarizing yourself with the concepts discussed in this chapter before moving onto the final projects discussed in this book.
In the upcoming chapters, we will discuss uploading sensor data stored in CSVÂ files to the cloud and logging errors encountered during the execution of an application. See you in the next chapter!