[mod_python] Vampire for module reloading

Gonzalo Sainz-Trápaga gomo at datafull.com
Thu Jul 7 11:32:28 EDT 2005


Hi,

Thanks for all the help.

On Thu, 2005-07-07 at 02:47 -0400, Graham Dumpleton wrote:
> As someone pointed out already, any local imports of modules which
> are a part of your web application should not use the "import" statement
> but should instead explicitly use apache.import_module(). Although
> they said to replace all uses of "import", you should only do so for your
> own code. Do not use apache.import_module() for modules which are
> a part of the standard Python distribution. The apache.import_module()
> function also doesn't work very well with packages, so avoid using
> packages for your own code.

What do you mean by "packages"? I am using sqlobject and a few others
which are installed in my shared hosting directory, inside a "packages"
file. What I am doing is altering sys.path in a config.py file that is
imported by all the other files in my application.
I will drop this and replace is with import_module() and the
corresponding path for the files like you recommended, but what do you
mean by "doesn't work very well"?

Thanks again,
-- 
Gonzalo Sainz-Trápaga (GomoX)
GnuPG Fingerprint: A0AF 3BBF EB93 7EFE 6628  C5A5 F073 9442 6DE4 A497
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6DE4A497
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050707/4aab0316/attachment.bin


More information about the Mod_python mailing list