How to efficiently interact with config files in Python.