Exemplo n.º 1
0
 def bundle_load(self, path):
     filepath = trio.bundle_filepath(path)
     store = trio.OBTFile(filepath)
     try:
         df = store.obt.ix[:]
         panel = df.to_panel()
         panel = panel.swapaxes('minor', 'items')
         return ColumnPanel(panel)
     finally:
         store.close()
Exemplo n.º 2
0
 def bundle_load(self, path):
     filepath = trio.bundle_filepath(path)
     store = trio.OBTFile(filepath)
     try:
         df = store.obt.ix[:]
         panel = df.to_panel()
         panel = panel.swapaxes('minor', 'items')
         return ColumnPanel(panel)
     finally:
         store.close()
Exemplo n.º 3
0
 def bundle_save(self, path, frame_key='frame_key'):
     """ 
     """
     filepath = trio.bundle_filepath(path)
     store = trio.OBTFile(filepath, 'w', frame_key=frame_key, type='directory')
     try:
         for key, frame in self.frames.items():
             # helpful if key is an object
             if hasattr(key, frame_key):
                 key = getattr(key, frame_key)
             store[key] = frame
     except:
         store.close()
         # delete on error, don't store half complete save
         self.delete(filepath)
         raise IOError()
     else:
         store.close()
Exemplo n.º 4
0
 def bundle_save(self, path, frame_key='frame_key'):
     """ 
     """
     filepath = trio.bundle_filepath(path)
     store = trio.OBTFile(filepath,
                          'w',
                          frame_key=frame_key,
                          type='directory')
     try:
         for key, frame in list(self.frames.items()):
             # helpful if key is an object
             if hasattr(key, frame_key):
                 key = getattr(key, frame_key)
             store[key] = frame
     except:
         store.close()
         # delete on error, don't store half complete save
         self.delete(filepath)
         raise IOError()
     else:
         store.close()