from fabric.api import run, cd def hello(): run("ls") def rb_test(): with cd('/tmp/'): run('pwd') run('ls')