By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

mod_python and the interpreter, no module _apache

P: n/a
Ok, so I'm working on a project right now that is being done in psp
through apache. This is working fine, except that in every one of my
modules I had to use the mod_python function of apache.import_module
for its autoreload capability.

Now I cannot open or run any of my classes in the interpreter without
getting a "No module named _apache" error. I need to get this
working, as I am without unittesting right now.

I also tried making my unit test into a psp page, but then I get an
error about:

================================================== ==============================
Mod_python error: "PythonHandler mod_python.psp"

Traceback (most recent call last):

File "/usr/local/stow/Python-2.3.4/lib/python2.3/site-packages/mod_python/apache.py",
line 299, in HandlerDispatch
result = object(req)

File "/usr/local/stow/Python-2.3.4/lib/python2.3/site-packages/mod_python/psp.py",
line 297, in handler
p.run()

File "/usr/local/stow/Python-2.3.4/lib/python2.3/site-packages/mod_python/psp.py",
line 208, in run
exec code in global_scope

File "/export/eecs/htdocs/eecs3550/team1/proj/lib/unittests/testRequestContainer.psp",
line 77, in ?
unittest.main()

File "/usr/local/stow/Python-2.3.4/lib/python2.3/unittest.py", line
714, in __init__
argv = sys.argv

AttributeError: 'module' object has no attribute 'argv'
================================================== ==============================

So that doesn't seem to work right for what I want either.

Does anybody know of a way to get both of these to coexist peacefully?
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.