special case loading modules with imp

E

Erendil

Alright, this is my first post here. =) Let's try to get this right?

I have a slight problem right now. I wrote a plugin architecture in Python,
allowing any python app or python using app to use plugins. It's very flexible
and open-ended, except for one thing: It has to use imp to load python source
from files. Now, using imp is not the problem really. The plugin module works
very well as of now, and I've used it lots of my other projects. What I need
to do now is I've read Python code out of an SQLite database into a string, and
I need my plugin module to use imp to load that string of code as a module.
(I don't use import because I simply store the module object in an array. makes
it unloadable later.)

So, I just want to switch from using real files to being able to use strings.
The goal is to get a module object that I can place in an array.

Thanks, Rob.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top