Coping with the Command Line

Command-line startup options, environment variables, and configuration files are important to many applications, particularly when it comes to the implementation of servers. There are a number of ways of dealing with program startup and object creation. This chapter will focus on argument parsing, and the overall architecture of an application.

This chapter will extend the configuration file handling from Chapter 14, Configuration Files and Persistence, with yet more techniques for command-line programs and the top level of a server. The core design principles from Chapter 15, Design Principles and Patterns, are essential when designing an application of any size. This chapter will also extend some logging design ...

Get Mastering Object-Oriented Python - Second Edition 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.