mailbox.Maildir(), confusing documentation

T

tinnews

Having got my Python 2.5.2 installed I'm trying some things out with
the mailbox.Maildir() class.

If I do the following:-

import maibox
mailbox.Maildir("/home/isbd/Mail/Li/pytest")

then the pytest Maildir mailbox is created - which is great but isn't
documented. If the above creates the maildir then what is the
mailbox.Maildir.add_folder() method for? I tried
mailbox.Maildir.add_folder() and it appeared to do nothing, it didn't
produce any errors either.

Anyway I'm happy that mailbox.Maildir() will create maildirs and it
means I can do basically what I want but the documentation could be a
bit more helpful. Are there any HowTos or FAQs for this (quite new I
know) part of Python?
 
P

Peter Otten

Having got my Python 2.5.2 installed I'm trying some things out with
the mailbox.Maildir() class.

If I do the following:-

import maibox
mailbox.Maildir("/home/isbd/Mail/Li/pytest")

then the pytest Maildir mailbox is created - which is great but isn't
documented. If the above creates the maildir then what is the
mailbox.Maildir.add_folder() method for? I tried
mailbox.Maildir.add_folder() and it appeared to do nothing, it didn't
produce any errors either.

You didn't expect the dot, it seems:
$ find .
..
../alpha
../alpha/tmp
../alpha/cur
../alpha/new
../alpha/.beta
../alpha/.beta/tmp
../alpha/.beta/cur
../alpha/.beta/new
../alpha/.beta/maildirfolder
$

Peter
 
T

tinnews

Peter Otten said:
You didn't expect the dot, it seems:
I didn't 'expect' the dot because it's not standard maildir syntax,
it's just one particular way of doing it.

.... but thanks for pointing out what was going on. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top