7.1. "The Greps of Wrath"
This chapter continues our exploration of systems programming case studies. Here, the focus is on Python scripts that perform more advanced kinds of file and directory processing. The examples in this chapter do system-level tasks such as converting files, comparing and copying directories, and searching files and directories for stringsa task idiomatically known as grepping.
Most of the tools these scripts employ were introduced in Chapter 4. Here, the goal is to show these tools in action in the context of more useful and realistic programs. As in the prior chapter, learning about Python programming techniques such as object-oriented programming (OOP) and encapsulation is also a hidden subgoal of most of the examples presented here.