Tags:python • pyftpdlib • FTP • module python 中关于 FTP 的第三方模块 ###1.pyftpdlib 是一款 Python FTP 服务器库。 Quick Start(快速创建一个 FTP 服务器): #!/usr/bin/python from pyftpdlib.servers import FTPServer from pyftpdlib.handlers import FTPHandler from pyftpdlib.authorizers import DummyAuthorizer authorizer = DummyAuthorizer() authorizer.add_user("user", "12345", "/home/username", perm="elradfmw") authorizer.add_anonymous("/home/nobody") handler = FTPHandler handler.authorizer = authorizer server = FTPServer(("127.0.0.1", 21), handler) server.serve_forever() Previous article Next article