Re: [Tutor] using json to pass a dict thru a file

2015-03-18 Thread Alan Gauld
On 17/03/15 22:30, Doug Basberg wrote: dataDict = {'Time': None, 'Vbatt': None, 'Ichrg': None, 'Vpanel': None} vb = 51.25 ic = 5.89 vp = 55.78 i = 0 dataDict['Time'] = tymAsc dataDict['Vbatt'] = vb dataDict['Ichrg'] = ic dataDict['Vpanel'] = vp fn = 'testData01.dat' f = open(fn, 'ab') I don

Re: [Tutor] using json to pass a dict thru a file

2015-03-17 Thread Dave Angel
On 03/17/2015 06:30 PM, Doug Basberg wrote: I appreciate the advise to use json to pass a dict thru a file. Below is the code To 'dump' the dict to a file and the code to 'load' the dict and the error message I get testing this. What am I doing wrong? Thanks. First two things I see are that

[Tutor] using json to pass a dict thru a file

2015-03-17 Thread Doug Basberg
I appreciate the advise to use json to pass a dict thru a file. Below is the code To 'dump' the dict to a file and the code to 'load' the dict and the error message I get testing this. What am I doing wrong? Thanks. /