On Mon, Aug 13, 2007 at 01:19:39PM +0100, Chris G wrote:
On Mon, Aug 13, 2007 at 10:32:56AM +0100, MJ Ray wrote:
Chris G cl@isbd.net wrote:
http://docs.python.org/lib/mailbox-maildir.html http://docs.python.org/lib/mailbox-mbox.html
[...]
In fact the Maildir sub-class documentation is not at all clear about what you get when you call list_folders(), a list of folders at what level in the hierarchy?
Warning: I'm a postmaster, but my python isn't expert.
Under the current Maildir, I guess, but you're right that it's not at all clear. Maildir supports nested folders (directories in directories) which Mbox doesn't (can't have files in files, usually). I think the key section of the explanation is:
"Folders of the style introduced by the Courier mail transfer agent are also supported. Any subdirectory of the main mailbox is considered a folder if "." is the first character in its name."
Well experimenting confirms the above, sort of, to me it seems distinctly broken!
E.g. I /home/chris/Mail I have the following (maildir) folders:-
. FcompParts family garden internet kyle-mutt money riding software .. FnewScientist france hardware invites leisure mud selling telecoms .in Fos2 freecycle holidays isbd lets pending sentmail vehicles Fcds boating friends houseHome jobs mairix personal shopping work
However if I execute list_dirs() in /home/chris/Mail it just gives me [.in] and that's the lot!