nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

loading a plugin in python

Von: Thomas Lehmann (iris-und-thomas-lehmann@t-online.de) [Profil]
Datum: 22.07.2009 18:38
Message-ID: <0251b87d-b073-43d9-9f91-ce2bf5764b26@i6g2000yqj.googlegroups.com>
Newsgroup: de.comp.lang.python
Hi!

Assume I have dynamically checked for a plugin:

<code>
filename = "plugin/dummy.py"
</code>

How can I load the simple plugin to get the instance?

<code>
class Dummy:
pass

def createInstance():
return Dummy()
</code>

[ Auf dieses Posting antworten ]

Antworten