def __init__(self,user,passwd): TocTalk.__init__(self,user,passwd) self.IMcount = 0 self.messages = [ "I'm angry, don't talk to me...", "That's it! If you talk to me one more time, I'm going to warn you.", "You asked for it." ]
def __init__(self, user, passwd, recv_func=None): """ Initialize the connection both as a TocTalk subclass. """ TocTalk.__init__(self, user, passwd) self._recv_func = recv_func self._ready = False self._debug = 0
def __init__(self, lovejoy, name, passwd): TocTalk.__init__(self, name, passwd) self._info = "This is the Lovejoy AIM Bot. Type \"help\" for commands." self.lovejoy = lovejoy self.lovejoy.connect() self.currTime = time.localtime() self.danceLyrics = ["We can dance if we want too", "We can leave your friends behind", "'Cause if your friends don't dance", "and if they don't dance", "Well they're no friends of mine"]
def connect(self): """ Connect to the AIM service. Overrides the behavior of the superclass by waiting until login has completed before returning. """ # Start the connection & login process to AIM TocTalk.connect(self) # Set socket to non-blocking, to be multitasking-friendly self._socket.setblocking(0) # Process events until login is a success while not self._ready: self.runOnce() time.sleep(0.1)
def execute(self): """Sends the IM with the commit message""" from toc import TocTalk, BotManager bm = BotManager() bot = TocTalk(self.screenname, self.password) bm.addBot(bot, "bot") time.sleep(4) message = self._generateMessage() names = [name.strip() for name in self.to.split(',')] for name in names: print name bot.do_SEND_IM(name, message)
def __init__(self, user, pw): TocTalk.__init__(self, user, pw) self._info = "Google-AIM Bot"
def __init__(self,name,passwd,outer,hl): TocTalk.__init__(self,name,passwd) self.outer = outer self.blist = {} self.hl = hl
def __init__(self,uname,password): TocTalk.__init__(self,uname,password)
def __init__(self,user,passwd, masterSN): TocTalk.__init__(self,user,passwd) self.masterSN = masterSN
def __init__(self,user,passwd): TocTalk.__init__(self,user,passwd) # great method of passing data # between the threads self.queue = Queue.Queue()