Jeff McNeil <j...@jmcneil.net> wrote: > > > The Maildir++ spec states that folders need to begin with a period. > > > The list_folders method enforces that: > > > > > def list_folders(self): > > > """Return a list of folder names.""" > > > result = [] > > > for entry in os.listdir(self._path): > > > if len(entry) > 1 and entry[0] == '.' and \ > > > os.path.isdir(os.path.join(self._path, entry)): > > > result.append(entry[1:]) > > > return result > > > > > The above example is from 2.6. Your structure is simply a list of > > > Maildir compliant directories below '/home/chris/Mail/apex.' They're > > > not, in the Maildir++ sense of the word, folders. > > > > So where does it say in the Python documentation that list_folders() > > works only with Maildir++? It's a big and non-obvious limitation to > > my mind. > > > > My maildir hierarchy is created by mutt which is a *very* standards > > compliant MUA, surely standard python libraries should work with > > standard maildirs not some wierd extension thereof. > > > > -- > > Chris Green > > > The doc says that "Folders of the style introduced by the Courier mail > transfer agent are also supported. Any subdirectory of the main
"... are also supported." says to me that 'standard' ones are supported as well and they're *not*. > mailbox is considered a folder if '.' is the first character in its > name." It's not an explicit endorsement of Maildir++, but it touches > on what it considers a folder definition. I'm treading on hazy memory > here, but I believe Maildir++ is the definition provided by the > Courier folks. > So why isn't the class called mailbox.Maildir++ ? :-) -- Chris Green -- http://mail.python.org/mailman/listinfo/python-list