diff options
-rwxr-xr-x | effitool | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -16,8 +16,31 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. +import configparser +import os +import sys + + +CONFIG_FILENAME = os.path.expanduser('~/.config/effitool/credentials.conf') + + +class Config: + + def __init__(self): + self._cp = configparser.ConfigParser() + + def read(self, filename): + with open(filename) as f: + self._cp.read_file(f) + + def dump(self, f): + self._cp.write(f) + + def main(): - print('hello from effitool') + config = Config() + config.read(CONFIG_FILENAME) + config.dump(sys.stdout) if __name__ == '__main__': |