def opt_path(self, path):
"""<path> is either a specific file or a directory to
be set as the root of the web server. Use this if you
have a directory full of HTML, cgi, php3, epy, or rpy files or
any other files that you want to be served up raw.
"""
self['root'] = static.File(os.path.abspath(path))
self['root'].processors = {
'.cgi': twcgi.CGIScript,
'.php3': twcgi.PHP3Script,
'.php': twcgi.PHPScript,
'.epy': script.PythonScript,
'.rpy': script.ResourceScript,
'.trp': trp.ResourceUnpickler,
}
评论列表
文章目录