with c as c:
res = c.run('pwd')
with c.cd('/home/yy/Desktop/'):
res2 = c.run('pwd')
path = os.path.join((res2.stdout).strip(),'sdata/bin')
res3 = connect = c.run('ls')
with c.cd(path):
原文:https://www.cnblogs.com/0916m/p/11484335.html