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

All Samples(18)  |  Call(0)  |  Derive(9)  |  Import(9)

src/l/a/lalita-0.1.1/lalita/plugins/example.py   lalita(Download)
# this is the only stuff from lalita you need to import
from lalita import Plugin
# there's an example with twisted, but you can write plugins without
class Example(Plugin):
    '''This is an example plugin, enjoy.'''
    def init(self, config):
        # register the translation table for our messages

src/l/a/lalita-0.1.1/lalita/plugins/url.py   lalita(Download)
import random
from lalita import Plugin
class Url (Plugin):

src/l/a/lalita-0.1.1/lalita/plugins/seen.py   lalita(Download)
import shelve
from lalita import Plugin
TRANSLATION_TABLE = {u"%s: acástoi, papafrita!": { 'en': u"%s: I'm here!"},
class Seen(Plugin):
    '''Plugin that implements the "seen" and "last" commands.'''
    def init(self, config):
        base = config.get('base_dir', None)
        self.register_translation(self, TRANSLATION_TABLE)

src/l/a/lalita-0.1.1/lalita/plugins/randomer.py   lalita(Download)
import re
from lalita import Plugin
class Randomer(Plugin):

src/l/a/lalita-0.1.1/lalita/plugins/moin_search.py   lalita(Download)
from BeautifulSoup import BeautifulSoup, Tag
from lalita import Plugin
def txtize(soup):
    if not isinstance(soup,Tag):
        return soup
    return ''.join(map(txtize,soup.childGenerator()))
class MoinSearch(Plugin):

src/l/a/lalita-0.1.1/lalita/plugins/misc.py   lalita(Download)
# For further info, see LICENSE file
from lalita import Plugin
class Ping(Plugin):

src/l/a/lalita-0.1.1/lalita/plugins/freenode.py   lalita(Download)
# For further info, see LICENSE file
from lalita import Plugin
class Register(Plugin):

src/l/a/lalita-0.1.1/lalita/core/tests/test_dispatcher.py   lalita(Download)
from twisted.internet import defer, reactor
from lalita import Plugin, dispatcher, events, ircbot
server = dict(
        class Helper(Plugin):
            def init(self, *args):
                d = {'a message' : {'es' : 'un mensaje'},
                     'with args: %s' : {'es' : 'con args: %s'}

src/l/a/lalita-0.1.1/lalita/core/tests/plugins/deathmatch.py   lalita(Download)
from lalita import Plugin
class TestPlugin(Plugin):