from pyftpdlib import ftpserver
HOSTNAME = "localhost"
PORT = 5555
authorizer = ftpserver.DummyAuthorizer()
authorizer.add_user("papakri", "dancinghotdogs", "/Users/alexandrospapakribopoulos/Documents/Programming")
authorizer.anonymous("/Users/alexandrospapakribopoulos/Documents/Programming")
handler = ftpserver.FTPHandler
handler.authorizer = authorizer
connection = (HOSTNAME, PORT)
ftpd = ftpsserver.FTPServer(connection, handler)
ftpd.serve_forever()
我正在尝试创建一个基本的 FTP,并与我创建的 HTTP 服务器连接并连接它。我对python有点陌生,所以即使它非常明显,请指出。我正在使用 python 2.7.10。提前致谢。