On Fri, May 21, 2010 at 5:50 PM, timo verbeek <timoverbee...@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__
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to