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)