def __init__( self, protocol = HIGHEST_PROTOCOL , compress = zlib.Z_DEFAULT_COMPRESSION , remove = True , ## immediate remove keep = False , ## keep it *args ): ## initialize the base: generate the name TmpDB.__init__ ( self , suffix = '.root' , remove = remove , keep = keep ) RootShelf.__init__ ( self , self.tmp_name , mode = 'n' , writeback = False , protocol = protocol , compress = compress , args = args )
def __init__ ( self , tablename = 'ostap' , compress_level = zlib.Z_BEST_COMPRESSION , journal_mode = "DELETE" , protocol = HIGHEST_PROTOCOL , remove = True , keep = False ) : ## initialize the base: generate the name TmpDB.__init__ ( self , suffix = '.lzdb' , remove = remove , keep = keep ) ## open DB SQLiteShelf.__init__ ( self , self.tmp_name , 'c' , tablename , True , ## False , ## writeback/autocommit compress_level , journal_mode , protocol )
def __init__(self, protocol=HIGHEST_PROTOCOL, compress=9, silent=False, keyencoding=ENCODING, remove=True, keep=False): ## initialize the base: generate the name TmpDB.__init__(self, suffix='.bz2db', remove=remove, keep=keep) ## open DB Bz2Shelf.__init__( self, self.tmp_name, 'c', protocol, compress, False, ## writeback silent, keyencoding)
def __init__( self, protocol=HIGHEST_PROTOCOL, compress=zlib.Z_BEST_COMPRESSION, silent=False, keyencoding=ENCODING, remove=True, ## immediate remove keep=False): ## keep it ## initialize the base: generate the name TmpDB.__init__(self, suffix='.zdb', remove=remove, keep=keep) ZipShelf.__init__( self, self.tmp_name, 'c', protocol, compress, False, ## writeback silent, keyencoding)
def close(self): ## close the shelve file Bz2Shelf.close(self) ## delete the file TmpDB.clean(self)
def close(self): ZipShelf.close(self) TmpDB.clean(self)
def close ( self ) : RootShelf.close ( self ) TmpDB.clean ( self )