July 2019
Beginner to intermediate
302 pages
9h 38m
English
In the preceding code, first, the instance folder is loaded from the given path, and then, the configuration file is loaded from the file named config.cfg in the given instance folder. Here, silent=True is optional and is used to suppress the error if config.cfg is not found in the instance folder. If silent=True is not given and the file is not found, then the application will fail, giving the following error:
IOError: [Errno 2] Unable to load configuration file (No such file or directory): '/absolute/path/to/config/file'