社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
私信  •  关注

junfeng qin

junfeng qin 最近创建的主题
junfeng qin 最近回复了
5 年前
回复了 junfeng qin 创建的主题 » 或者.rename(src,dest)throws文件在python中没有错误

您可以参考源代码

    def rename(self, remote_src, remote_dest):
    """rename a file or directory on the remote host.

    :param str remote_src: the remote file/directory to rename

    :param str remote_dest: the remote file/directory to put it

    :returns: None

    :raises: IOError

    """
    self._sftp_connect()
    self._sftp.rename(remote_src, remote_dest)