def connect(self):

        import imaplib

        M = None
        try:
            if (self.keyfile and self.certfile) or self.ssl:
                M = imaplib.IMAP4_SSL(self.host, self.port, self.keyfile, self.certfile)
            else:
                M = imaplib.IMAP4(self.host, self.port)

            M.login(self.username, self.password)
            M.select()
        except socket.error, err:
            raise
        else:
            return M
Return the callback associated with the request token.
dataset/ETHPy150Open codekoala/django-articles/articles/management/commands/check_for_articles_from_email.py/IMAPHandler.connect--crossover with--dataset/ETHPy150Open ib-lundgren/flask-oauthprovider/flask_oauthprovider.py/OAuthProvider.get_callback