Example #1
0
def allJavascriptPackages():
    """
    Return a dictionary mapping JavaScript module names to local filenames
    which implement those modules.  This mapping is constructed from all the
    C{IJavascriptPackage} plugins available on the system.  It also includes
    C{Nevow.Athena} as a special case.
    """
    d = {}
    for p in plugin.getPlugIns(inevow.IJavascriptPackage, plugins):
        d.update(p.mapping)
    return d
Example #2
0
def run(argv=None):
    if argv is None:
        argv = sys.argv
    sitepackages = join(sysconfig.get_config_var('BINLIBDEST'),
                        "site-packages")
    prefix = sysconfig.get_config_var('prefix')
    install(sitepackages, prefix)

    # this builds the mktap plugin cache (twisted/plugins/dropin.cache)
    from twisted import plugin
    list(plugin.getPlugIns(plugin.IPlugin))

    return 0
Example #3
0
def run(argv=None):
    if argv is None:
        argv = sys.argv
    sitepackages = join(sysconfig.get_config_var('BINLIBDEST'),
                        "site-packages")
    prefix = sysconfig.get_config_var('prefix')
    install(sitepackages, prefix)

    # this builds the mktap plugin cache (twisted/plugins/dropin.cache)
    from twisted import plugin
    list(plugin.getPlugIns(plugin.IPlugin))

    return 0
Example #4
0
 def getPlugins(interface, package=_sentinel):
     kw = {}
     if package is not _sentinel:
         kw['module'] = package
     return getPlugIns(interface, **kw)
Example #5
0
 def getPlugin(self, name):
     for plug in plugin.getPlugIns('ldaptor.apps.webui.smartObject'):
         if plug.name == name:
             return plug
     raise KeyError, name
Example #6
0
 def havePlugins(self):
     for plug in plugin.getPlugIns('ldaptor.apps.webui.smartObject'):
         return True
     return False
Example #7
0
 def listPlugins(self):
     for plug in plugin.getPlugIns('ldaptor.apps.webui.smartObject'):
         yield plug.name