Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Enables `trigger`.

:trigger: The trigger to enable. Can be a key for a callback or a
regular expression

        def enable(trigger):
    """Enables `trigger`.

    :trigger: The trigger to enable. Can be a key for a callback or a
    regular expression

    """
    if trigger in _callbacks:
        _callbacks[trigger].enabled = True

    for regex in _regexes:
        if regex.pattern == trigger:
            _regexes[regex].enabled = True
        


src/l/a/lala-0.3/lala/plugins/base.py   lala(Download)
    command = text.split()[1]
    logging.info("Enabling %s" % command)
    lala.pluginmanager.enable(command)
 
@command(admin_only=True)

src/l/a/lala-0.3/test/test_pluginmanager.py   lala(Download)
 
        pluginmanager.disable("command")
        pluginmanager.enable("command")
        self.assertTrue(pluginmanager._callbacks["command"].enabled)
        self.assertRaises(ValueError, pluginmanager._handle_message, "user",
 
        pluginmanager.disable(regex.pattern)
        pluginmanager.enable(regex.pattern)
        self.assertTrue(pluginmanager._regexes[regex].enabled)
        self.assertRaises(ValueError, pluginmanager._handle_message, "user",