def select(self, mailbox='INBOX', readonly=False):
        self.untagged_responses = {}    # Flush old responses.
        self.is_readonly = readonly
        if readonly:
            name = 'EXAMINE'
        else:
            name = 'SELECT'
        typ, dat = self._simple_command(name, mailbox)
        if typ != 'OK':
            self.state = 'AUTH'     # Might have been 'SELECTED'
            return typ, dat
        self.state = 'SELECTED'
        if 'READ-ONLY' in self.untagged_responses \
                and not readonly:
            if __debug__:
                if self.debug >= 1:
                    self._dump_ur(self.untagged_responses)
            raise self.readonly('%s is not writable' % mailbox)
        return typ, self.untagged_responses.get('EXISTS', [None])
Test Language Data
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/imaplib.py/IMAP4.select--crossover with--dataset/ETHPy150Open yoavaviram/python-amazon-simple-product-api/tests.py/TestAmazonApi.test_languages_spanish