mailbox.Babyl.unlock()

unlock() Three locking mechanisms are used—dot locking and, if available, the flock() and lockf() system calls.

mailbox.Babyl.lock()

lock() unlock() Three locking mechanisms are used—dot locking and, if available, the flock() and lockf() system calls.

mailbox.Babyl.get_labels()

get_labels() Return a list of the names of all user-defined labels used in the mailbox. Note The actual messages are inspected to determine which labels exist in the mailbox rather than consulting the list of labels in the Babyl options section, but the Babyl section is updated whenever the mailbox is modified.

mailbox.Babyl.get_file()

get_file(key) In Babyl mailboxes, the headers of a message are not stored contiguously with the body of the message. To generate a file-like representation, the headers and body are copied together into an io.BytesIO instance, which has an API identical to that of a file. As a result, the file-like object is truly independent of the underlying mailbox but does not save memory compared to a string representation.

mailbox.Babyl

class mailbox.Babyl(path, factory=None, create=True) A subclass of Mailbox for mailboxes in Babyl format. Parameter factory is a callable object that accepts a file-like message representation (which behaves as if opened in binary mode) and returns a custom representation. If factory is None, BabylMessage is used as the default message representation. If create is True, the mailbox is created if it does not exist. Babyl is a single-file mailbox format used by the Rmail mail user agent includ

macpath

Source code: Lib/macpath.py This module is the Mac OS 9 (and earlier) implementation of the os.path module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X (or any other platform). The following functions are available in this module: normcase(), normpath(), isabs(), join(), split(), isdir(), isfile(), walk(), exists(). For other functions available in os.path dummy counterparts are available.

lzma.open()

lzma.open(filename, mode="rb", *, format=None, check=-1, preset=None, filters=None, encoding=None, errors=None, newline=None) Open an LZMA-compressed file in binary or text mode, returning a file object. The filename argument can be either an actual file name (given as a str or bytes object), in which case the named file is opened, or it can be an existing file object to read from or write to. The mode argument can be any of "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for binary mode, or "r

lzma.LZMAFile.peek()

peek(size=-1) Return buffered data without advancing the file position. At least one byte of data will be returned, unless EOF has been reached. The exact number of bytes returned is unspecified (the size argument is ignored). Note While calling peek() does not change the file position of the LZMAFile, it may change the position of the underlying file object (e.g. if the LZMAFile was constructed by passing a file object for filename).

lzma.LZMAFile

class lzma.LZMAFile(filename=None, mode="r", *, format=None, check=-1, preset=None, filters=None) Open an LZMA-compressed file in binary mode. An LZMAFile can wrap an already-open file object, or operate directly on a named file. The filename argument specifies either the file object to wrap, or the name of the file to open (as a str or bytes object). When wrapping an existing file object, the wrapped file will not be closed when the LZMAFile is closed. The mode argument can be either "r" fo

lzma.LZMAError

exception lzma.LZMAError This exception is raised when an error occurs during compression or decompression, or while initializing the compressor/decompressor state.