Created
September 30, 2019 23:32
-
-
Save Kristian-Roopnarine/a3af74e8392b17815bb0da9258a54937 to your computer and use it in GitHub Desktop.
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
def read_passwords(self,filename): | |
if os.path.exists(filename): | |
with open(filename) as file: | |
return json.load(file) | |
else: | |
data = {} | |
with open(filename,'w') as outfile: | |
json.dump(data,outfile) | |
return data | |
def save_passwords(self,data,filename): | |
with open(filename,'w') as file: | |
json.dump(data,file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment