def start_client(): with cd("loopix/loopix"): run("git pull") run("twistd -y run_client.py") pid = run("cat twistd.pid") print "Run Client on %s with PID %s" % (env.host, pid) run("rm -f *.csv")