Skip to Content
Modern Python Standard Library Cookbook
book

Modern Python Standard Library Cookbook

by Alessandro Molina
August 2018
Intermediate to advanced
366 pages
10h 14m
English
Packt Publishing
Content preview from Modern Python Standard Library Cookbook

Reading configuration files

When your software has too many options to simply pass them all through the command line, or when you want to ensure that your users don't have to manually provide them every time they start the application, loading those options from a configuration file is one of the most widespread solutions.

Configuration files should be easy to read and write for humans, as they will be working with them quite often, and one of the most common requirements is for them to allow comments, so that the user can place comments in the configuration to write down why some options were set or how some values were computed. This way, when the user comes back to the configuration file in six months, they will still know the reasons ...

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

Advanced Python Development: Using Powerful Language Features in Real-World Applications

Advanced Python Development: Using Powerful Language Features in Real-World Applications

Matthew Wilkes

Publisher Resources

ISBN: 9781788830829Supplemental Content