parameters: (self)
return_statement: return typ, dat
docstring: Shutdown connection to server.
  
          (typ, [data]) = <instance>.logout()
  
          Returns server 'BYE' response.
docstring_summary: Shutdown connection to server.
docstring_tokens: Shutdown connection to server .
function: def logout(self):
          """Shutdown connection to server.
  
          (typ, [data]) = <instance>.logout()
  
          Returns server 'BYE' response.
          """
          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
function_tokens: 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