Skip to Main Content
Programming Python, Second Edition
book

Programming Python, Second Edition

by Mark Lutz
March 2001
Intermediate to advanced content levelIntermediate to advanced
1296 pages
38h 8m
English
O'Reilly Media, Inc.
Content preview from Programming Python, Second Edition

Chapter 4. Larger System Examples I

“Splits and Joins and Alien Invasions”

This chapter and the next continue our look at the system utilities domain in Python. They present a collection of larger Python scripts that do real systems work -- comparing and copying directory trees, splitting files, searching files and directories, testing other programs, configuring program shell environments, launching web browsers, and so on. To make this collection easier to absorb, it’s been split into a two-chapter set. This chapter presents assorted Python system utility programs that illustrate typical tasks and techniques in this domain. The next chapter presents larger Python programs that focus on more advanced file and directory tree processing.

Although the main point of these two case-study chapters is to give you a feel for realistic scripts in action, the size of these examples also gives us an opportunity to see Python’s support for development paradigms like OOP and reuse at work. It’s really only in the context of nontrivial programs like the ones we’ll meet here that such tools begin to bear tangible fruit. These chapters also emphasize the “why” of systems tools, not just the “how” -- along the way, I’ll point out real-world needs met by the examples we’ll study, to help you put the details in context.

One note up front: these chapters move quickly, and a few of their examples are largely just listed for independent study. Because all the scripts here are all heavily documented and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Python, 3rd Edition

Programming Python, 3rd Edition

Mark Lutz

Publisher Resources

ISBN: 0596000855Supplemental ContentCatalog PageErrata