[mod_python] PSP imports

Dan W. dwmp at opti.cgi.net
Sun Nov 30 19:52:57 EST 2003


At 12:22 AM 11/25/2003 -0500, you wrote:
>if you want the module properly reloaded when it changes, import it like
>this:
>
>mymodule = apache.import_module('mymodule')

I've attempted this on a PSP page with a packaged module and am not getting 
the module in the global namespace.

<%
apache.import_module('mypackage.mymodule')
%>
<html>
<body>
<%=`globals()`%>
</body>
</html>

I don't get any errors, just a silent failure (mypackage is not in 
globals).  mypackage is in the lib/python/site-packages folder and it works 
properly if I use the standard python import.

Any ideas?

-Dan



More information about the Mod_python mailing list