How to Read, Update and Delete Options
Explore how to read, update, and delete configuration options in Python using the configparser module. Learn to handle config files by creating self-contained functions that read values, modify settings, and remove entries, while following best coding practices.
We'll cover the following...
We'll cover the following...
Now we’re ready to learn how to read the config file, update its options and even how to delete options. In this case, it’s easier to learn by actually writing some code! Just add the following function to the code that you wrote above.
This code first checks to see if the path for the config file exists. If it does not, then it uses the createConfig ...