python ftp示例,python示例,class Writer
文章由Byrx.net分享于2019-03-23 07:03:33
python ftp示例,python示例,class Writer
class Writer: def __init__(self, file): self.f = open(file, 'w') def __call__(self, data): self.f.write(data) self.f.write('\n') print dataFILENAME = 'AutoIndent.py'writer = Writer(FILENAME)import ftplibftp = ftplib.FTP('127.0.0.1', 'book', 'bookpw')ftp.retrlines('RETR %s' % FILENAME, writer)
相关内容
- urllib2 绑定ip来访问url,urllib2绑定ipurl,import urlli
- python设置进程的环境变量,python环境变量,import ospri
- python创建访问对象属性,python创建对象,class Critte
- python NameTag类,pythonnametag类,class NameTa
- python重写父类方法,python重写,class MyList
- python中使用self参数,pythonself参数,class Bag:
- python udp 服务器,pythonudp,import socke
- python虚函数定义,python函数定义,class Specia
- python的get set方法示例,pythongetset示例,class Critte
- 罗马数字,,import strin
评论关闭