Nov-27-2018, 11:28 AM
Besides Buran's suggestion to use configparser, your program can have a strategy such as:
- If the program is called with -c or --config option, use the config file given on the command line
- Otherwise use myprog.cfg file from the current directory
- Otherwise use a user default config file such as ~/.config/myprog/default.cfg
- Otherwise use a system-wide default config file ...