예제 #1
0
 def getAnnotations(name):
     metadatafile = File.metadatafileFromName(name)
     if os.path.exists(metadatafile):
         json_data=open(metadatafile)
         data = json.load(json_data)
         json_data.close()
     else:
         data = {}
     
     return data
예제 #2
0
 def saveAnnotations(name, dict):
     metadatafile = File.metadatafileFromName(name)
     fp = open(metadatafile, mode='w')
     json.dump(dict, fp)