예제 #1
0
 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     )
예제 #2
0
 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        ) 
예제 #3
0
파일: bz2shelve.py 프로젝트: OstapHEP/ostap
    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)
예제 #4
0
    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)
예제 #5
0
파일: bz2shelve.py 프로젝트: OstapHEP/ostap
 def close(self):
     ## close the shelve file
     Bz2Shelf.close(self)
     ## delete the file
     TmpDB.clean(self)
예제 #6
0
 def close(self):
     ZipShelf.close(self)
     TmpDB.clean(self)
예제 #7
0
 def close ( self )  :
     RootShelf.close ( self )
     TmpDB.clean     ( self )