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

All Samples(40)  |  Call(40)  |  Derive(0)  |  Import(0)

src/l/a/lalita-0.1.1/lalita/plugins/example.py   lalita(Download)
    def private(self, user, text):
        self.logger.debug("private message from %s: %s", user, text)
        self.say(user, u'Me dijiste "%s"', text)
 
    def talked_to_me(self, user, channel, msg):
        self.logger.debug("%s talked to me in %s: %s", user, channel, msg)
        txt = u"Hola %s, mi nombre es %s, :)"
        self.say(channel, txt, user, self.nickname)
    def command_foo(self, user, channel, command, *args):
        u"@foo txt: sólo repite lo recibido."
        self.logger.debug("command %s from %s (args: %s)", command, user, args)
        if args:
            self.say(channel, args[0])
        else:
            txt = u"%s: Me tenés que decir algo para que lo repita!"
            self.say(channel, txt, user)
    def command_bar(self, user, channel, command, *args):
        u"""@bar: Zen de Python, al azar."""
        self.logger.debug("command %s from %s (args: %s)", command, user, args)
        self.say(channel, u"Del Zen de Python:")
        self.say(channel, u"    " + random.choice(zen))

src/l/a/lalita-0.1.1/lalita/plugins/seen.py   lalita(Download)
    def seen(self, user, channel, command, nick=None):
        u'''Indica cuando fue visto por última vez un usuario y qué hizo.'''
        if nick is None:
            self.say(channel, u"%s: tenés que indicar un nick", user)
            return
 
        if self.config['clever'] and nick == self.nickname:
            self.say(channel, u"%s: acástoi, papafrita!", user)
 
        if self.config['clever'] and nick == user:
            self.say(channel, u"%s: andá mirate en el espejo del baño", user)
            return
        encoded_nick = nick.encode(self.encoding)
        # didn't se him at all or he has just been silent
        if when1 is None and when2 is None:
            self.say(channel, u"%s: se me quedó en la otra pollera :|", user)
            return
 
        else:
            what = u"%s: [%s] %s" % (user, when2.strftime ("%x %X"), what2)
        self.say(channel, what)
 
    def last(self, user, channel, command, nick=None):

src/l/a/lalita-0.1.1/lalita/plugins/url.py   lalita(Download)
        self.logger.debug (result)
        data= dict (zip (('id', 'url', 'date', 'time', 'poster', 'title'), result))
        self.say(channel, (self.config['in_format'] % data))
 
    def dig(self, user, channel, command, *what):
        u'''Busca 'algo' en los títulos o URLs que se dijeron antes.'''
        self.logger.debug(u'looking for %s', what)
        if not what:
            self.say(channel,
            for result in results:
                data = dict(zip(('id', 'url', 'date', 'time', 'poster', 'title'), result))
                self.say(channel, self.config['found_format'] % data)
        else:
            self.say (channel, '%s: 404 Search term not found: %s' % (user, what[0]))
 
    def delete (self, user, channel, command, *what):
        u'''Borra de los registros los IDs indicados.'''
        if not what:
            self.say(channel,

src/l/a/lalita-0.1.1/lalita/plugins/moin_search.py   lalita(Download)
                return []
            else:
                self.say(channel,u'No econtré resultados')
        elif len(results) > self._max_results:
            self.say(channel, 'Hay %i resultados %s' % (len(results),full_query))
        else:
            self.say(channel,' '.join(results))

src/l/a/lalita-0.1.1/lalita/plugins/randomer.py   lalita(Download)
    def answer(self, user, channel, *args):
        comment = u' '.join(args)
        whom = random.random() > 0.9 and '%s: ' % user or ''
        where = channel is not None and channel or user
        self.say(where, '%s%s' % (whom, contestame(comment)))

src/l/a/lalita-0.1.1/lalita/plugins/misc.py   lalita(Download)
    def ping(self, user, channel, command):
        u'''Sólo contesto.'''
        self.logger.debug("let's play ping pong with %s!" % user)
        self.say(channel, u"%s: pong" % user)
 

src/l/a/lalita-0.1.1/lalita/plugins/freenode.py   lalita(Download)
    def freenode_register(self, user, msg):
        self.logger.debug("%s: %s", user, msg)
        if user == 'NickServ':
            if '/msg NickServ identify' in msg:
                self.say(user, u"identify %s" % self.config['password'])

src/l/a/lalita-0.1.1/lalita/core/tests/test_dispatcher.py   lalita(Download)
            def simple(self, user, channel, *args):
                self.say(channel, 'a message')
                self.test(True)
            def withargs(self, user, channel, command, *args):
                self.say(channel, 'with args: %s', command)

src/l/a/lalita-0.1.1/lalita/core/tests/plugins/deathmatch.py   lalita(Download)
        else:
            msg = u"itchy: Hola!" # scratchy says
        self.say(channel, msg)
 
    def talked_to_me(self, user, channel, msg):
            if msg != "Hola!":
                raise ValueError("Bad message 1: %r" % msg)
            self.say(channel, u"%s, ¿cómo estás?" % user) # itchy says
        elif self.nickname == "scratchy" and self.state == "joined":
            self.state = "msg"
            if msg != u"¿cómo estás?":
                raise ValueError("Bad message 2: %r" % msg)
            self.say(channel, u"@foo") # scratchy says
            if command != "foo" or args:
                raise ValueError("Bad info in cmd1: %r %r" % (command, args))
            self.say(channel, u"@bar baz") # itchy says
        elif self.nickname == "itchy" and self.state == "cmd":
            self.state = "done"
            if command != "foo" or args != ("mate", "esta"):
                raise ValueError("Bad info in cmd3: %r %r" % (command, args))
            self.say(channel, u":D") # itchy says