Yes. It uses the underlying close() function which does that for you. Source here.
(In other words: That file I/O is buffered is large abstracted and hidden away from you. Doing an open, write, close shouldn't leave stuff unwritten as that's what you already intended with write. A buffer that routinely eats what gets thrown at it would be quite a bad design or a hungry buffer.) – Joey Mar 15 '10 at 12:54 Thanks, that was my guess too.
But is this true cross-platform, cross-OS, and cross-languages? – Adam Matan Mar 15 '10 at 12:57 @Adam Matan: That's why Python sits on top of the C libraries.To assure that "this true cross-platform, cross-OS". I don't know what "cross-languages" means.
– S. Lott Mar 15 '10 at 13:18 +1 Thanks. By "cross-language" I meant to ask whether this behavior is similar in the vast majority of modern programming languages.
– Adam Matan Mar 15 '10 at 15:25.
NB: close() and flush() won't ensure that the data is actually secure on the disk. It just ensures that the OS has the data == that it isn't buffered inside the process. You can try sync or fsync to get the data written to the disk.
– Adam Matan Mar 15 '10 at 13:55 Depends on the time scales you are talking about. E.g. Some versions of ext4 might wait whole seconds before committing your data to the disc.
– Douglas Leeder Mar 15 '10 at 14:44 +1 If the order of magnitude is seconds, I'm quite safe. Thanks! – Adam Matan Mar 15 '10 at 15:22.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.