|
__init__(self,
path,
factory=None,
create=True)
Initialize a single-file mailbox. |
|
|
|
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. |
|
|
|
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 disk. |
|
|
|
_pre_mailbox_hook(self,
f)
Called before writing the mailbox to file f. |
|
|
|
_pre_message_hook(self,
f)
Called before writing each message to file f. |
|
|
|
_post_message_hook(self,
f)
Called after writing each message to file f. |
|
|
|
close(self)
Flush and close the mailbox. |
|
|
|
_lookup(self,
key=None)
Return (start, stop) or raise KeyError. |
|
|
|
_append_message(self,
message)
Append message to mailbox and return (start, stop) offsets. |
|
|
Inherited from Mailbox :
__contains__ ,
__delitem__ ,
__getitem__ ,
__iter__ ,
clear ,
discard ,
get ,
get_file ,
get_message ,
get_string ,
items ,
iteritems ,
itervalues ,
keys ,
pop ,
popitem ,
update ,
values
|