creating addon system
Krister Svanlund
krister.svanlund at gmail.com
Fri May 21 14:32:46 EDT 2010
On Fri, May 21, 2010 at 5:50 PM, timo verbeek <timoverbeek10 at gmail.com> wrote:
> What is the easiest way in python to create a addon system?
> I found to easy ways:
> * using a import system like this:
> for striper in stripers:
> if striper["enabled"]:
> exec("from strip import %s as _x"%striper["striper"])
> string = _x.start(string)
> * using exec
> for striper in stripers:
> if striper["enabled"]:
> use=open(stripper)
> exec(use)
>
> Do you now is the best way?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Check this one out: http://docs.python.org/library/functions.html#__import__
More information about the Python-list
mailing list