def __init__( self, inpath, table, entry=None ):
        f=open( inpath + '/' + table, 'r')

        if( f == None ):
            print "Table file %s does  not exist " % (inpath + "/" + table )

        lines = f.readlines()

        startParse=[0]
        stopParse=[len(lines)]

        # --------------------------------
        # extract user specified entry
        # -------------------------------
        if( entry != None ):
            startParse = [ i for i in range(len(lines)) \
                           if re.match( ".*entry.*"+entry+".*", lines[i] ) != None  ]
            stopParse  = [ i for i in range(startParse[0]+2, len(lines)) \
                         if re.match( ".*==========.*", lines[i] ) != None  ]
            
        self.dico = dict([ tuple(lines[i].split(":")) 
                           for i in range(startParse[0], stopParse[0])
                           if len(lines[i].split(':')) == 2 ] )

        # --------------------------------
        # extract levels
        # -------------------------------
        if 'requested' in self.dico.keys():

            self.dico['levels'] = self.dico['requested'].split('!')[0].split()
            # --------------
            # Convert to int
            # ---------------
            self.dico['levels'] = [ int( float( self.dico['levels'][i] ) )
                                    for i in range( len( self.dico['levels'] ) )]
            self.dico['levels'].sort()
Transaction decorator factory. Create a decorator that wraps the
dataset/ETHPy150Open apache/climate/obs4MIPs/Toolbox/CMORresources.py/CMORTable.__init__--crossover with--dataset/ETHPy150Open CenterForOpenScience/osf.io/framework/transactions/context.py/transaction