def logout(self):
        self.state = 'LOGOUT'
        try: typ, dat = self._simple_command('LOGOUT')
        except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]]
        self.shutdown()
        if 'BYE' in self.untagged_responses:
            return 'BYE', self.untagged_responses['BYE']
        return typ, dat
Shutdown connection to server.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/imaplib.py/IMAP4.logout