You can add configuration settings to your code using configparser. This enables you to quickly change the datasources, algorithms etc without changing the code (say no more to huge commented code blocks).
2. The flow should be the following (not sure about fallbacks....)
```python
import configparser
config = configparser.ConfigParser()
config.read("config.ini")
...
self.Algorithm = config.get("general", "algorithm", fallback="RungeKutta8")
self.LogFile = config.get("logging", "logfile", fallback=None)
...
if self.Algorithm == "RungeKutta8":
...
You can also add default settings and much more...
You can add configuration settings to your code using
configparser
. This enables you to quickly change the datasources, algorithms etc without changing the code (say no more to huge commented code blocks).Concept
config.ini
file that looks like this:[logging] level=debug logfile=path/to/logfile
You can also add default settings and much more...