how saving/retreiving python code from DB ?

Joonas Paalasmaa joonas at olen.to
Wed Jul 18 10:00:12 EDT 2001


vincent delft wrote:
> 
> I'm looking for a module that allow us to store/import python code into
> DB (bsddb for example) instead of a file.
> 
> like "import" retreives coding in flat files, is there a way to retreive
> coding for a DB ?
> something like :
>     db.open('db')
>     db.dbimport('module1')
>     print module1.test()
> 
> where 'time' whas previously save into the DB as a Python code :
> class module1:
>     def test(self):
>         print "work"

imp module should do the trick
http://www.python.org/doc/current/lib/module-imp.html



More information about the Python-list mailing list