Make config file parsing (mostly) compatible with the Python implementation