John Raines
jrraines at comcast.net
Mon Sep 20 20:15:25 EDT 2004
thanks I'll give it a try! On Sep 20, 2004, at 1:45 PM, mod_python user wrote: > John Raines wrote: >> Subject: >> [mod_python] No module named _apache from inside apache >> I continue to get this error message... > <snip /> >> ImportError: No module named _apache > > Hi John, > > I have a solution, but I can't tell you exactly why it works, only that > it does. There is probably a different and better way to do it. > > I'm pretty new to python and by extension, mod_python, but I > encountered > your situation once before. I was trying to use "_apache.parse_qs" and > "_apache.parse_qsl". > > The _apache module appears to be built-in to mod_python; furthermore, > it > seems to be directly available *only* to other modules in the > mod_python > directory. So, in the mod_python directory I created a file, > "mp_helper.py", whose contents consist of only one line: "import > _apache". Then, within my own application I include this line: "from > mod_python import mp_helper". > > After that I was able to access parse_qs and parse_qsl as > mp_helper.parse_qs and mp_helper.parse_qsl. > > Hope that is useful to you, > Mike Wright > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|