def flush ( self ) : for name in self . item_names : item = self [ name ] item . flush ( ) self . file . flush ( )
python write all items
Ensure contents are written to file .
def flush(self):
        """Ensure contents are written to file."""
        for name in self.item_names:
            item = self[name]
            item.flush()
        self.file.flush()