def browse(self): 
        """ go through all subfolders (starting at '.') and return information
            about the existing experiments. if the -B option is given, all 
            parameters are shown, -b only displays the most important ones.
            this function does *not* execute any experiments.
        """
        for d in self.get_exps('.'):
            params = self.get_params(d)
            name = params['name']
            basename = name.split('/')[0]
            # if -e option is used, only show requested experiments
            if self.options.experiments and basename not in self.options.experiments:
                continue
                
            fullpath = os.path.join(params['path'], name)
            
            # calculate progress
            prog = 0
            for i in range(params['repetitions']):
                prog += progress(params, i)
            prog /= params['repetitions']
            
            # if progress flag is set, only show the progress bars
            if self.options.progress:
                bar = "["
                bar += "="*int(prog/4)
                bar += " "*int(25-prog/4)
                bar += "]"
                print '%3i%% %27s %s'%(prog,bar,d)
                continue
            
            print '%16s %s'%('experiment', d)
                           
            try:
                minfile = min(
                    (os.path.join(dirname, filename)
                    for dirname, dirnames, filenames in os.walk(fullpath)
                    for filename in filenames
                    if filename.endswith(('.log', '.cfg'))),
                    key=lambda fn: os.stat(fn).st_mtime)
            
                maxfile = max(
                    (os.path.join(dirname, filename)
                    for dirname, dirnames, filenames in os.walk(fullpath)
                    for filename in filenames
                    if filename.endswith(('.log', '.cfg'))),
                    key=lambda fn: os.stat(fn).st_mtime)
            except ValueError:
                print '         started %s'%'not yet'
                
            else:      
                print '         started %s'%time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(os.stat(minfile).st_mtime))
                print '           ended %s'%time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(os.stat(maxfile).st_mtime))
            
            for k in ['repetitions', 'iterations']:
                print '%16s %s'%(k, params[k])   
            
            print '%16s %i%%'%('progress', prog)
            
            if self.options.browse_big:
                # more verbose output
                for p in [p for p in params if p not in ('repetitions', 'iterations', 'path', 'name')]:
                    print '%16s %s'%(p, params[p])
                    
            print
dataset/ETHPy150Open rueckstiess/expsuite/expsuite.py/PyExperimentSuite.browse/original