
Hi,
mit der Loesung von Dookie gibts leider ein kleines Problem:
def add_plugins(ppath): """ add all plugins form additional pluginpath <ppath> """ for modul in os.listdir(ppath): mname = os.path.splitext(modul)[0] try: f, fname, description = imp.find_module(mname, ppath) except ImportError: continue
wobei ppath "$HOME/projects/pyfilmdbsimpleui/plugins" ist und dort ein entsprechends Modul abgelegt (im Beispiel mal ofdb_de.py genannt). Auch eine __init__.py hab ich (sicherheitshalber) angelegt. In dem Modul ist
from siteparser.pluginmanager import BasePlugin
class OFDB_DE_Parser(BasePlugin): def __init__(self): BasePlugin.__init__(self)
Ein normaler import des Modul funktioniert wunderbar.
Die exakte Fehlermeldung ist: "No frozen submodule named /home/andreas/projects/pyfilmdbsimpleui/plugins.ofdb_de"
Ich nehme mal an, dass der "." das Problem ist, aber ich hab keinen Schimmer woher der kommt.
Andreas

On 24.01.06 21:34:05, Andreas Pakulat wrote:
Hi,
mit der Loesung von Dookie gibts leider ein kleines Problem:
def add_plugins(ppath): """ add all plugins form additional pluginpath <ppath> """ for modul in os.listdir(ppath): mname = os.path.splitext(modul)[0] try: f, fname, description = imp.find_module(mname, ppath) except ImportError: continue
Auch wenns vermutlich niemanden interessiert: ppath muss eine Liste sein, damit imp.find_module funktioniert.
Andreas
participants (1)
-
Andreas Pakulat