在这里,我有这个小示例片段,它只是不会从 www 目录提供 index.html。代码有什么问题?
from twisted.internet import reactor
from twisted.web import static, server, script
import os
DIRECTORY = os.getcwd()+"/www"
root = static.File(DIRECTORY)
root.indexNames = [ 'index.rpy', 'index.html' ]
root.processors = { '.rpy': script.ResourceScript }
site = server.Site(root)
reactor.listenTCP(8090, site)
reactor.run()
我得到的只是“没有这样的资源”消息。有没有办法设置日志记录或解决这个问题?