Change format of import
svn: r19936
This commit is contained in:
parent
d1ac573c51
commit
cdf504dc9d
@ -37,10 +37,10 @@ from _pluginreg import (PluginData, PluginRegister, REPORT, TOOL,
|
|||||||
CATEGORY_QR_CITATION, CATEGORY_QR_SOURCE_OR_CITATION,
|
CATEGORY_QR_CITATION, CATEGORY_QR_SOURCE_OR_CITATION,
|
||||||
START, END, make_environment,
|
START, END, make_environment,
|
||||||
)
|
)
|
||||||
from _manager import BasePluginManager
|
|
||||||
from _import import ImportPlugin
|
from _import import ImportPlugin
|
||||||
from _export import ExportPlugin
|
from _export import ExportPlugin
|
||||||
from _docgenplugin import DocGenPlugin
|
from _docgenplugin import DocGenPlugin
|
||||||
|
from _manager import BasePluginManager
|
||||||
from _gramplet import Gramplet
|
from _gramplet import Gramplet
|
||||||
from utils import *
|
from utils import *
|
||||||
from _options import (Options, OptionListCollection, OptionList,
|
from _options import (Options, OptionListCollection, OptionList,
|
||||||
|
@ -46,7 +46,7 @@ from gen.ggettext import gettext as _
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gen.config import config
|
from gen.config import config
|
||||||
import gen.plug
|
from gen.plug import PluginRegister, ImportPlugin, ExportPlugin, DocGenPlugin
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -91,7 +91,7 @@ class BasePluginManager(object):
|
|||||||
self.__mod2text = {}
|
self.__mod2text = {}
|
||||||
self.__modules = {}
|
self.__modules = {}
|
||||||
|
|
||||||
self.__pgr = gen.plug.PluginRegister.get_instance()
|
self.__pgr = PluginRegister.get_instance()
|
||||||
self.__registereddir_set = set()
|
self.__registereddir_set = set()
|
||||||
self.__loaded_plugins = {}
|
self.__loaded_plugins = {}
|
||||||
|
|
||||||
@ -475,7 +475,7 @@ class BasePluginManager(object):
|
|||||||
continue
|
continue
|
||||||
mod = self.load_plugin(pdata)
|
mod = self.load_plugin(pdata)
|
||||||
if mod:
|
if mod:
|
||||||
imp = gen.plug.ImportPlugin(name=pdata.name,
|
imp = ImportPlugin(name=pdata.name,
|
||||||
description = pdata.description,
|
description = pdata.description,
|
||||||
import_function = getattr(mod, pdata.import_function),
|
import_function = getattr(mod, pdata.import_function),
|
||||||
extension = pdata.extension)
|
extension = pdata.extension)
|
||||||
@ -502,7 +502,7 @@ class BasePluginManager(object):
|
|||||||
if (pdata.export_options and
|
if (pdata.export_options and
|
||||||
hasattr(mod, pdata.export_options)):
|
hasattr(mod, pdata.export_options)):
|
||||||
options = getattr(mod, pdata.export_options)
|
options = getattr(mod, pdata.export_options)
|
||||||
exp = gen.plug.ExportPlugin(name=pdata.name_accell,
|
exp = ExportPlugin(name=pdata.name_accell,
|
||||||
description = pdata.description,
|
description = pdata.description,
|
||||||
export_function = getattr(mod, pdata.export_function),
|
export_function = getattr(mod, pdata.export_function),
|
||||||
extension = pdata.extension,
|
extension = pdata.extension,
|
||||||
@ -527,7 +527,7 @@ class BasePluginManager(object):
|
|||||||
continue
|
continue
|
||||||
mod = self.load_plugin(pdata)
|
mod = self.load_plugin(pdata)
|
||||||
if mod:
|
if mod:
|
||||||
dgp = gen.plug.DocGenPlugin(name=pdata.name,
|
dgp = DocGenPlugin(name=pdata.name,
|
||||||
description = pdata.description,
|
description = pdata.description,
|
||||||
basedoc = getattr(mod, pdata.basedocclass),
|
basedoc = getattr(mod, pdata.basedocclass),
|
||||||
paper = pdata.paper,
|
paper = pdata.paper,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user