def do_select(self, cmd, examine = False):
        # NOTE: If this client currently has messages being processed in the
        # command queue for this mailbox then they are all tossed when they
        # pre-emptively select another mailbox (this could cause the client
        # some heartburn as commands they issues will never get their final
        # message.. but that is their problem.)
        #
        # Selecting a mailbox, even if the attempt fails, automatically
        # deselects any already selected mailbox.
        #
        self.pending_expunges = []
        if self.state == "selected":
            self.state = "authenticated"
            if self.mbox:
                self.mbox.unselected(self)
                self.mbox = None

        # Note the 'selected()' method may fail with an exception and
        # we should not set our state or the mailbox we have selected
        # until 'selected()' returns without a failure.
        #
        mbox = self.server.get_mailbox(cmd.mailbox_name)
        mbox.selected(self)
        self.mbox = mbox
        self.state = "selected"
        self.examine = examine
        if self.examine:
            return "[READ-ONLY]"
        return "[READ-WRITE]"

    ##################################################################
    #
Select a folder, enter in to 'selected' mode.
dataset/ETHPy150Open scanner/asimap/asimap/client.py/Authenticated.do_select