Kind of the opposite of this question.
Is there a way to tell Python "Do not write to disk until I tell you to." (by closing or flushing the file)? I'm writing to a file on the network, and would rather write the entire file at once.
In the meantime, I'm writing to a StringIO buffer, and then writing that to the disk at the end.