special case loading modules with imp

Discussion in 'Python' started by Erendil@aol.com, Jul 30, 2003.

  1. Guest

    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.
    , Jul 30, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abs
    Replies:
    6
    Views:
    1,853
  2. SMG
    Replies:
    1
    Views:
    1,486
    John Saunders
    Jul 26, 2004
  3. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,371
    Carl Prothman [MVP]
    Jan 12, 2005
  4. Dave
    Replies:
    2
    Views:
    298
    Nick Coghlan
    Dec 19, 2004
  5. Matthias Kramm

    The imp module and cyclic imports

    Matthias Kramm, Nov 24, 2005, in forum: Python
    Replies:
    2
    Views:
    315
    Matthias Kramm
    Nov 27, 2005
Loading...

Share This Page