def optimise():
    with cd("/home/web2py/"):
        # Restore indexes via Python script run in Web2Py environment
        run("python web2py.py -S eden -M -R applications/eden/static/scripts/tools/indexes.py", pty=True)
        # Compile application via Python script run in Web2Py environment
        run("python web2py.py -S eden -M -R applications/eden/static/scripts/tools/compile.py", pty=True)
Apply Optimisation
dataset/ETHPy150Open sahana/eden/static/scripts/tools/fabfile.py/optimise