Exemple #1
0
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
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
def get_pwa_model(pickle_file):
    pickled_pwa = fops.get_data(pickle_file)
    return pickle.loads(pickled_pwa)
Exemple #5
0
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)
Exemple #6
0
def get_pwa_model(pickle_file):
    pickled_pwa = fops.get_data(pickle_file)
    return pickle.loads(pickled_pwa)