#! /usr/bin/env python # coding=utf-8 # run without arguments for usage info import re import sys import os from optparse import OptionParser list_of_files = [] directories = [] def treat_file_names(file) : global list_of_files #first get the actual string if a number or None is provided if file is None : file = list_of_files[-1] if type(file) is int : file = list_of_files[file] list_of_files.append(file) #now get a path #first try the directories for d in directories : joined = os.path.join(d, file) if (os.path.isfile(joined)) : return joined #otherwise just return the file itself (note: if it does not exist, an exception will be thrown anyway) return file #extract total computation time def p_time(file = None) : file = treat_file_names(file) log_content = open(file).read() matched = re.search("Time for model checking:[^0-9]*(?P