mod_python and the interpreter, no module _apache

J

Jeff

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top