On Sat, May 14, 2022, 7:12 AM Undiscussed Horrific Abuse, One Victim of Many <gmkarl@gmail.com> wrote:
class yamf:
    def __init__(self, host, port, user, pw, imap = imaplib.IMAP4_SSL):
        self.imap = imap(host, port)
        self.imap.login(user, pw)
        print(self.imap.welcome.decode())

# this is how far I am

(Pdb) p imap.list(directory='""',pattern='Sent')
('OK', [b'(\\HasNoChildren) "/" "Sent"'])

commands are returned as a tuple of status and data, which here is an array
list responses are bytes values containing a quoted, space-separated 3-tuple.