def main(): usage = "%(prog)s <filename>" parser = argparse.ArgumentParser(description="demo pwa", usage=usage) parser.add_argument("trace_file", default=None, type=str) args = parser.parse_args() parsed_trace = parse_trace(fops.get_data(args.trace_file)) if parsed_trace is None: print "No CE found!" else: print parsed_trace
def main(): usage = '%(prog)s <filename>' parser = argparse.ArgumentParser(description='demo pwa', usage=usage) parser.add_argument('trace_file', default=None, type=str) args = parser.parse_args() parsed_trace = parse_trace(fops.get_data(args.trace_file)) if parsed_trace is None: print('No CE found!') else: #print(parsed_trace) for ass in parsed_trace: print(ass)
def test_pickling(pwa_rep, pickle_fname): pickled_pwa_w = pickle.dumps(pwa_rep, pickle.HIGHEST_PROTOCOL) fops.write_data(pickle_fname, pickled_pwa_w) pickled_pwa_r = fops.get_data(pickle_fname) return pickle.loads(pickled_pwa_r)
def get_pwa_model(pickle_file): pickled_pwa = fops.get_data(pickle_file) return pickle.loads(pickled_pwa)