当我突然收到错误消息时,我想使用 pyftpdlib 在 Windows 上设置一个 ftp 服务器。
我想运行这个:
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
from pyftpdlib.contrib.authorizers import WindowsAuthorizer
authorizer = WindowsAuthorizer()
authorizer = WindowsAuthorizer(anonymous_user="guest", anonymous_password="1234")
handler = FTPHandler
handler.authorizer = authorizer
server = FTPServer(('', 2121), handler)
server.serve_forever()
但是当我想导入“WindowsAuthorizer”时,我收到了这个错误消息:
from pyftpdlib.contrib.authorizers import WindowsAuthorizer c:\Program Files\Python27\lib\site-packages\pyftpdlib\contrib__init__.py:3: Dep recationWarning: pyftpdlib.contrib namespace is deprecated
_depwarn("pyftpdlib.contrib namespace is deprecated") c:\Program Files\Python27\lib\site-packages\pyftpdlib\contrib\authorizers.py:35: DeprecationWarning: pyftpdlib.contrib.authorizers 模块已弃用;使用 pyf tpdlib.authorizers 代替
_depwarn("pyftpdlib.contrib.authorizers 模块已弃用;"
我真的不知道是什么问题,我已经安装了 pywin32。