Last active
September 10, 2015 00:01
-
-
Save justinturpin/1d8824a8e6dca6baa9ca to your computer and use it in GitHub Desktop.
Python Config Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ConfigParser import ConfigParser | |
class Config: | |
def __init__(self, paths): | |
self._config_parser = ConfigParser() | |
loaded_configs = self._config_parser.read(paths) | |
def __getattr__(self, k): | |
return self._config_parser.get("default", k) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment