Chapter 16. Coping With the Command Line

Command-line startup options, environment variables, and configuration files are important to many applications, particularly the implementation of servers. There are a number of ways of dealing with program startup and object creation. We'll look at two issues in this chapter: argument parsing and the overall architecture for an application.

This chapter will extend the configuration file handling from Chapter 13, Configuration Files and Persistence, with yet more techniques for command-line programs and the top-level of a server. It will also extend some logging design features from Chapter 14, The Logging and Warning Modules.

In the next chapter, we'll extend these principles to continue looking at a kind ...

Get Mastering Object-oriented Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.