示例#1
0
 def _load_op1_data(self, filename):
     f = open(filename, 'r')
     iff = IFFFile(f)
     appl = iff.__getitem__(u'APPL')     # sorry for accessing internal functions, but TE hides the metadata well
     rawdata = appl.read()
     print rawdata
     data = rawdata.split('op-1')[1]
     f.close()
     return json.loads(data)
示例#2
0
 def _write_op1_data(self, filename):
     """
     not yet working
     """
     f = open(filename, 'w')
     iff = IFFFile(f)
     appl = iff.__getitem__(u'APPL')     # sorry for accessing internal functions, but TE hides the metadata well
     print self.op1data
     data = "op-1%s" % json.dumps(self.op1data, sort_keys=True)
     print data
     appl.write(data)
     f.close()