python通过ftp上传文件,,引入ftplib模块通过
python通过ftp上传文件,,引入ftplib模块通过
引入ftplib模块通过ftp发送文件的方法
import ftplib # We import the FTP modulesession = ftplib.FTP('myserver.com','login','passord') # Connect to the FTP servermyfile = open('toto.txt','rb') # Open the file to sendsession.storbinary('STOR toto.txt', myfile) # Send the filemyfile.close() # Close the filesession.quit() # Close FTP session
相关内容
- 帮同事写的一个切换数据库启动的小工具,同事切换数
- python检测远程udp端口是否打开,python检测udp端口,pytho
- 分析并输出Python代码依赖的库,输出python代码依赖,#!
- 文件按照日期命名,文件日期命名,# -*- coding
- python判断远程端口是否打开,python判断端口,python判断远
- python helloworld,helloworld,#!/usr/bin/e
- o(n)时间复杂度替换字符串中空格为%20,字符串,class o
- python编写的最简单的web服务器,python编写web,下面的py
- A*(A星)算法python实现,算法python,None
- uuid压缩成64位编码,uuid64位编码,SAFEHASH = [
评论关闭