,如文件上传、下载、修改文件权限等操作。...put(localpath, remotepath, callback=None, confirm=True) #上传
localpath(str类型),需上传的本地文件(源);
remotepath...(str类型),远程路径(目标);
callback(funcation(int,int)),获取已接收的字节数及总传输字节数,以便回调函数调用,默认为None;
confirm(bool类型),文件上传完毕后是否调用...except:
return {"status": 0, "stdout": stdout, "stderr": stderr, 'exit_code': 127}
#文件上传下载方法...#Python splitlines() 按照行('\r', '\r\n', \n')分隔,返回一个包含各行作为元素的列表,如果参数 keepends 为(默认值) False,不包含换行符,如果为 True