Module mailbox :: Class Babyl
[hide private]
[frames] | no frames]

_ClassType Babyl

       Mailbox --+    
                 |    
_singlefileMailbox --+
                     |
                    Babyl

An Rmail-style Babyl mailbox.

Instance Methods [hide private]
 
__init__(self, path, factory=None, create=True)
Initialize a Babyl 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.
 
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.
 
get_labels(self)
Return a list of user-defined labels in the mailbox.
 
_generate_toc(self)
Generate key-to-(start, stop) table of contents.
 
_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.
 
_install_message(self, message)
Write message contents and return (start, stop).

Inherited from _singlefileMailbox: __len__, close, flush, has_key, iterkeys, lock, unlock

Inherited from _singlefileMailbox (private): _append_message, _lookup

Inherited from Mailbox: __contains__, __delitem__, __getitem__, __iter__, clear, discard, get, items, iteritems, itervalues, keys, pop, popitem, update, values

Inherited from Mailbox (private): _dump_message

Class Variables [hide private]
  _special_labels = frozenset(['answered', 'deleted', 'edited', ...
Method Details [hide private]

__init__(self, path, factory=None, create=True)
(Constructor)

 

Initialize a Babyl mailbox.

Overrides: Mailbox.__init__

add(self, message)

 

Add message and return assigned key.

Overrides: Mailbox.add

remove(self, key)

 

Remove the keyed message; raise KeyError if it doesn't exist.

Overrides: Mailbox.remove

__setitem__(self, key, message)
(Index assignment operator)

 

Replace the keyed message; raise KeyError if it doesn't exist.

Overrides: Mailbox.__setitem__

get_message(self, key)

 

Return a Message representation or raise a KeyError.

Overrides: Mailbox.get_message

get_string(self, key)

 

Return a string representation or raise a KeyError.

Overrides: Mailbox.get_string

get_file(self, key)

 

Return a file-like representation or raise a KeyError.

Overrides: Mailbox.get_file

_pre_mailbox_hook(self, f)

 

Called before writing the mailbox to file f.

Overrides: _singlefileMailbox._pre_mailbox_hook

_pre_message_hook(self, f)

 

Called before writing each message to file f.

Overrides: _singlefileMailbox._pre_message_hook

_post_message_hook(self, f)

 

Called after writing each message to file f.

Overrides: _singlefileMailbox._post_message_hook

Class Variable Details [hide private]

_special_labels

Value:
frozenset(['answered',
           'deleted',
           'edited',
           'filed',
           'forwarded',
           'resent',
           'unseen'])