def run_script(mayavi, script_name):
    from mayavi.core.common import exception

    g = sys.modules['__main__'].__dict__
    if 'mayavi' not in g:
        g['mayavi'] = mayavi
        g['engine'] = mayavi.engine
    g['__file__'] = script_name
    error = False
    # Do execfile
    try:
        # If we don't pass globals twice we get NameErrors and nope,
        # using exec open(script_name).read() does not fix it.
        exec(compile(open(script_name).read(), script_name, 'exec'), g, g)
    except Exception as msg:
        exception(str(msg))
        error = True

    return error

# This runs the runtests script and sends any args to it.
Execfiles a given script.  The name `mayavi` is bound to the
dataset/ETHPy150Open enthought/mayavi/mayavi/scripts/mayavi2.py/run_script