用class定义ftp工具的各种方法 import os,sys from ftplib import FTP from mimetypes import guess_type,add_type from getpass import getpass #定义默认配置 dfltSite = '192.168.191.1' dfltUser = () dfltRdir = '.' class FtpTools: #allows these 3 to be redefined def getlocal…