Plugins in Python
Lars Yencken
lljy at students.cs.mu.oz.au
Thu Jun 27 21:39:32 EDT 2002
Hello,
I'm trying to do plugins for a program I'm writing in Python, and I'm not
sure how exactly to do it. Basically what I want it to be able to write a
module which loads every python file in a directory and stores an instance
of each one that loaded successfully.
I tried using exec() and compile() to run each of the files in the
directory from my Plugins module, and had each of the files import my
Plugins module and store an instance of themselves there, but at the end of
it they weren't stored.
Any ideas?
Thanks,
Lars
More information about the Python-list
mailing list