Changeset 235


Ignore:
Timestamp:
09/10/14 20:40:44 (5 years ago)
Author:
spascoe
Message:

Append json objects to Rec.json

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/ceda_cc/c4.py

    r229 r235  
    615615def dump_drs_list(drs_list, filename): 
    616616    import json 
    617     fh = open(filename, 'w') 
    618     json.dump(drs_list, fh) 
    619     fh.close() 
     617    with open(filename, 'a+' as fh): 
     618          for drs in drs_list: 
     619                fh.write(json.dumps(drs)) 
     620                fh.write('\n') 
    620621 
    621622 
Note: See TracChangeset for help on using the changeset viewer.