J
Johannes Bauer
Hello group,
I'm developing a GUI application in Python and having a blast so far
What I'd like to add: I want the GUI users to supply plugin scripts,
i.e. offer some kind of API. That is, I want the user to write short
Python pieces which look something like
import guiapp
class myplugin():
def __init__(self):
guiapp.add_menu("foobar")
def exec(self, param):
print("foo")
the GUI application should now browse the plugin directory and read
those plugin python files and somehow incorporate (i.e. discover what
modules are there, instanciate, etc.)
How do I do that at runtime with Python?
Kind regards,
Johannes
I'm developing a GUI application in Python and having a blast so far
What I'd like to add: I want the GUI users to supply plugin scripts,
i.e. offer some kind of API. That is, I want the user to write short
Python pieces which look something like
import guiapp
class myplugin():
def __init__(self):
guiapp.add_menu("foobar")
def exec(self, param):
print("foo")
the GUI application should now browse the plugin directory and read
those plugin python files and somehow incorporate (i.e. discover what
modules are there, instanciate, etc.)
How do I do that at runtime with Python?
Kind regards,
Johannes