'Initialize an MH instance.'

def __init__(self, path, factory=None, create=True):

    Mailbox.__init__(self, path, factory, create)
    if (not os.path.exists(self._path)):
        if create:
            os.mkdir(self._path, 448)
            os.close(os.open(os.path.join(self._path, '.mh_sequences'), ((os.O_CREAT | os.O_EXCL) | os.O_WRONLY), 384))
        else:
            raise NoSuchMailboxError(self._path)
    self._locked = False
