Skip to Main Content
Programming Python, 3rd Edition
book

Programming Python, 3rd Edition

by Mark Lutz
August 2006
Intermediate to advanced content levelIntermediate to advanced
1600 pages
51h 46m
English
O'Reilly Media, Inc.
Content preview from Programming Python, 3rd Edition

Other System Tools

In this and the prior two chapters, we’ve met most of the commonly used system tools in the Python library. Along the way, we’ve also learned how to use them to do useful things such as start programs, process directories, and so on. The next two chapters are something of a continuation of this topic. They use the tools we’ve just met to implement scripts that do useful and more realistic system-level work, so read on for the rest of this story.

Still, other system-related tools in Python appear even later in this text. For instance:

  • Sockets (used to communicate with other programs and networks) are introduced in Chapter 13.

  • Select calls (used to multiplex among tasks) are also introduced in Chapter 13 as a way to implement servers.

  • File locking with os.open and calls in the fcntl module appear in the PyErrata example described at the end of Chapter 17.

  • Regular expressions (string pattern matching used by many text processing tools) don’t appear until Chapter 21.

Moreover, things like forks and threads are used extensively in the Internet scripting chapters: see the server implementations in Chapter 13 and the FTP and email GUIs in Chapter 14. Along the way, we’ll also meet higher-level Python modules such as SocketServer, which implement fork and thread-based server code for us. In fact, most of this chapter’s tools will pop up constantly in later examples in this book—about what one would expect of general-purpose, portable libraries.

Last but not necessarily least, ...

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

Learning Python, 3rd Edition

Learning Python, 3rd Edition

Mark Lutz

Publisher Resources

ISBN: 0596009259Supplemental ContentErrata Page