Supply a plugin interface

Johannes Bauer dfnsonfsduifb at
Thu Apr 23 09:47:56 CEST 2009

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):

	def exec(self, param):

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,

"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
         -- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
                         <48d8bf1d$0$7510$5402220f at>

More information about the Python-list mailing list