(self, f)
Called before writing the mailbox to file f.
Called before writing the mailbox to file f.
Called before writing the mailbox to file f .
def _pre_mailbox_hook(self, f):
        """Called before writing the mailbox to file f."""
        babyl = b'BABYL OPTIONS:' + linesep
        babyl += b'Version: 5' + linesep
        labels = self.get_labels()
        labels = (label.encode() for label in labels)
        babyl += b'Labels:' + b','.join(labels) + linesep
        babyl += b'\037'
        f.write(babyl)
def _pre_mailbox_hook ( self , f ) : babyl = b'BABYL OPTIONS:' + linesep babyl += b'Version: 5' + linesep labels = self . get_labels ( ) labels = ( label . encode ( ) for label in labels ) babyl += b'Labels:' + b',' . join ( labels ) + linesep babyl += b'\037' f . write ( babyl )