PyDocs

Nav

Internet Data Handling

MH

mailbox

class (source)
  • MH(path, factory=None, create=True)
An MH mailbox.
Changed in 3.13
  • 3.13: Supported folders that don’t contain a .mh_sequences file.
Members of MH

_

__delitem__
These methods immediately delete the message.

a

add_folder
Create a folder and return an MH instance representing it.

c

close
Flush and close the mailbox.

d

discard
If the keyed message exists, remove it.

f

flush
Write any pending changes to the disk.

g

get_file
Return a file-like representation or raise a KeyError.
get_folder
Return an MH instance for the named folder.
get_sequences
Return a name-to-key-list dictionary to define each sequence.

l

list_folders
Return a list of folder names.
lock
Lock the mailbox.

p

pack
Re-name messages to eliminate numbering gaps.

r

remove
Remove the keyed message; raise KeyError if it doesn't exist.
remove_folder
Delete the named folder, which must be empty.

s

set_sequences
Set sequences using the given name-to-key-list dictionary.

u

unlock
Unlock the mailbox if it is locked.
0 Examples
No examples for mailbox/MH.
See Also
No see-alsos for mailbox/MH
0 Notes
No notes for MH