Пример #1
0
    filelist.remove(fname)

#filelist = filelist[15:]

#temporarily disable show
plt_show = plt.show


def noop(*args):
    pass


plt.show = noop

cont = input("""Are you sure you want to run all of the examples?
This is done mainly to check that they are up to date.
(y/n) >>> """)
has_errors = []
if 'y' in cont.lower():
    for run_all_f in filelist:
        try:
            print("\n\nExecuting example file", run_all_f)
            print("-----------------------" + "-" * len(run_all_f))
            exec(open(run_all_f).read())
        except:
            #f might be overwritten in the executed file
            print("**********************" + "*" * len(run_all_f))
            print("ERROR in example file", run_all_f)
            print("**********************" + "*" * len(run_all_f))
            has_errors.append(run_all_f)
            if stop_on_error:
Пример #2
0
for fname in ['run_all.py', 'example_rpy.py']:
    filelist.remove(fname)

#filelist = filelist[15:]



#temporarily disable show
plt_show = plt.show
def noop(*args):
    pass
plt.show = noop

cont = input("""Are you sure you want to run all of the examples?
This is done mainly to check that they are up to date.
(y/n) >>> """)
has_errors = []
if 'y' in cont.lower():
    for run_all_f in filelist:
        try:
            print("\n\nExecuting example file", run_all_f)
            print("-----------------------" + "-"*len(run_all_f))
            exec(open(run_all_f).read())
        except:
            #f might be overwritten in the executed file
            print("**********************" + "*"*len(run_all_f))
            print("ERROR in example file", run_all_f)
            print("**********************" + "*"*len(run_all_f))
            has_errors.append(run_all_f)
            if stop_on_error: