creating addon system

T

timo verbeek

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?
 
K

Krister Svanlund

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?

Check this one out: http://docs.python.org/library/functions.html#__import__
 
A

Adam Tauno Williams

T

timo verbeek

Is there not an other way to create a fast addon system?
A module or something like that
 

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,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top