Paramiko Fails to download large files >1GB

前端 未结 7 1502
一向
一向 2020-12-13 10:44
def download():
if os.path.exists( dst_dir_path ) == False:
    logger.error( \"Cannot access destination folder %s. Please check path and permissions. \" % ( dst_di         


        
7条回答
  •  孤街浪徒
    2020-12-13 11:16

    In addition to Screwtape's answer it's also worth mentioning that you should probably limit the block size with .read([block size in bytes])

    See lazy method for reading big file

    I had real issues with just file.read() without block size size in 2.4 it is possible 2.7 determines the correct block size though.

提交回复
热议问题