|
__init__(self,
path,
factory=None,
create=True)
Initialize an MH instance. |
|
|
|
add(self,
message)
Add message and return assigned key. |
|
|
|
remove(self,
key)
Remove the keyed message; raise KeyError if it doesn't exist. |
|
|
|
__setitem__(self,
key,
message)
Replace the keyed message; raise KeyError if it doesn't exist. |
|
|
|
get_message(self,
key)
Return a Message representation or raise a KeyError. |
|
|
|
get_string(self,
key)
Return a string representation or raise a KeyError. |
|
|
|
get_file(self,
key)
Return a file-like representation or raise a KeyError. |
|
|
|
iterkeys(self)
Return an iterator over keys. |
|
|
|
has_key(self,
key)
Return True if the keyed message exists, False otherwise. |
|
|
|
__len__(self)
Return a count of messages in the mailbox. |
|
|
|
lock(self)
Lock the mailbox. |
|
|
|
unlock(self)
Unlock the mailbox if it is locked. |
|
|
|
flush(self)
Write any pending changes to the disk. |
|
|
|
close(self)
Flush and close the mailbox. |
|
|
|
list_folders(self)
Return a list of folder names. |
|
|
|
get_folder(self,
folder)
Return an MH instance for the named folder. |
|
|
|
add_folder(self,
folder)
Create a folder and return an MH instance representing it. |
|
|
|
remove_folder(self,
folder)
Delete the named folder, which must be empty. |
|
|
|
get_sequences(self)
Return a name-to-key-list dictionary to define each sequence. |
|
|
|
set_sequences(self,
sequences)
Set sequences using the given name-to-key-list dictionary. |
|
|
|
pack(self)
Re-name messages to eliminate numbering gaps. |
|
|
|
_dump_sequences(self,
message,
key)
Inspect a new MHMessage and update sequences appropriately. |
|
|
Inherited from Mailbox :
__contains__ ,
__delitem__ ,
__getitem__ ,
__iter__ ,
clear ,
discard ,
get ,
items ,
iteritems ,
itervalues ,
keys ,
pop ,
popitem ,
update ,
values
|