fredrik at pythonware.com
Sat Nov 20 12:20:43 CET 1999
Bill Wilkinson <yopen at my-Deja.com> wrote:
> I have searched the documentation but have not found anything that helps me
> with this.
> I want to be able to import a module from a variable instead of a file. I
> need to do this because all my modules are going to be in a database. So I
> want have something like this:
> s = "lots of classes and functions loaded from a database"
> import s
check out the imputil.py module in greg stein's "small"
distribution kit  (also in gordon's installer kit ). it
allows you to create and install custom importers using
only a few lines of Python code.
More information about the Python-list