Fri, 21 Oct 2016 22:43:55 -0400 wrote Adam Jensen: > The mailbox library documentation seems to be a little weak. In this > example: > > https://docs.python.org/2.7/library/mailbox.html#examples > > import mailbox for message in mailbox.mbox('~/mbox'): > subject = message['subject'] # Could possibly be None. > if subject and 'python' in subject.lower(): > print subject > > What is the structure of "message"? I guess it's a dictionary but what > is its structure? What are the keys? Is the structure constant or does > it change depending upon the content of the mbox? > > I'm a bit new to python documentation. How would a potential user of the > "mailbox" library determine these things? Or did I miss something?
I would type: help(mailbox) after importing it. best regards andy -- https://mail.python.org/mailman/listinfo/python-list