passwdtools/cfgfile.py

15 lines
366 B
Python
Raw Normal View History

2019-03-18 15:28:32 +00:00
import json
class CfgFile:
def __init__(self):
self.cfg_file = '/Volumes/GMGAUTHIER/keys/pwdtools/config.json'
def read(self):
with open(self.cfg_file, mode="r") as cfgfile:
return json.load(cfgfile)
def write(self, keys):
with open(self.cfg_file, mode="w") as cfgfile:
cfgfile.write(json.dumps(keys))