May-11-2017, 03:40 AM
Here's an example that writes a dictionary to json file.
To read back in:
with open('data\RFCindex.json', 'w') as jout: json.dump(self.tdict, jout)Build your dictionary completely, then write the whole thing
To read back in:
with open('data\RFCindex.json', 'r') as jin: self.tdict = json.load(jin)[/python]