From: Josh C. <jc...@nc...> - 2008-02-03 16:46:32
|
On Sat, 2 Feb 2008, Nitro wrote: > The problem is that when you do "import mymodule" in python then python > will always try to find an initmymodule function, so there's no way to > re-route it to an init function with a different name. You can have it use a different name with the imp module. Doing import imp modname = imp.load_dynamic('bar', 'foo.so') will load foo.so but execute initbar. I don't know that this helps you, but I occasionally find it useful. Josh |