Mod_Ptyhon:mod_python-3.3.1.win32-py2.5-Apache2.2
python :2.5.4
import mod_python.apache 时报错
:no module named _apache ?
有遇到类似问题的兄弟吗?
[b]问题补充:[/b]
己知Mod_Python:http://www.modpython.org/FAQ/faqw.py?req=show&file=faq02.002.htp
全英文,有点不知所云.
懂英文的兄弟能大致解释一下好吗?
[b]问题补充:[/b]
谢谢laitaogood的翻译
MOD_PYTHON ERROR
ProcessId: 3348
Interpreter: 'lazarus.com'
ServerName: 'lazarus.com'
DocumentRoot: 'D:/AppServ/www'
URI: '/test/mptest.py'
Location: None
Directory: 'D:/AppServ/www/test/'
Filename: 'D:/AppServ/www/test/mptest.py'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'mptest'
Traceback (most recent call last):
File "D:\Python25\Lib\site-packages\mod_python\importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "D:\Python25\Lib\site-packages\mod_python\importer.py", line 1206, in _process_target
object = apache.resolve_object(module, object_str, arg, silent=silent)
File "D:\Python25\Lib\site-packages\mod_python\apache.py", line 696, in resolve_object
raise AttributeError, s
AttributeError: module 'D:\AppServ\www\test\mptest.py' contains no 'handler'
MODULE CACHE DETAILS
Accessed: Fri Jun 26 12:05:15 2009
Generation: 1
_mp_5e9aa0c2790cb0de6f82b4f385eb777b {
FileName: 'D:\AppServ\www\test\mptest.py'
Instance: 1
Generation: 1
Modified: Fri Jun 26 11:56:43 2009
Imported: Fri Jun 26 12:05:13 2009
}
[quote]The _apache module allows mod_python to get access to all the internal bits of apache. It is built in to the mod_python apache code and made available to python when mod_python is initialised. [/quote]
_apache模块允许mod_python去访问apache的内部块。它构建了mod_python的apache代码并且使得mod_python初始化的时候对python可用。
[quote]This means that you can't import mod_python into scripts that are run from the command line or any other context outside a running apache server.
An exception to this is the _psp module. You can import this module, since it is just the interface to the flex-based C parser for psp. [/quote]
这意味着你不能导入mod_python到那些从命令行运行的代码块或任何当前上下文外的正在运行的apache服务到代码块中。
一个例外是_psp模块。你可以导入这个模块,它仅仅是psp的c解析器。
我E文也不好哦,呵呵,凑合理解吧
呃……,没装过Mod_Python
找了篇安装详解,LZ看看咯
[url]http://www.workgroup.cn/?q=node/23[/url]