ftpServer.encoding = “utf-8”
#!/usr/local/bin/python3
#coding=utf-8
import ftplib
host="192.144.210.xxx" #ip或域名
username="theyn"
password="Gq123456"
ftpServer=ftplib.FTP(host)
ftpServer.encoding = "utf-8"
ftpServer.login(username,password)
ftpServer.dir() #列出目录
print("登录成功")