It is starting to look as though flush (and close?) should take an optional wait parameter, to indicate how much re-assurance you're willing to wait for.
It also looks like we can't know enough to predict all sensible symbolic constants -- so instead use a floating point numeric value. f.flush(wait=0) ==> current behavior f.flush(wait=1) ==> Do everything you can. On a Mac, this would apparently mean (everything up to and including) fcntl(fd, F_FULLSYNC) f.flush(wait=0.5) ==> somewhere in between, depending on the operating system and file system and disk drive and other stuff the devoloper won't know in advance. The exact interpretation of intermediate values might depend on the installation or even change over time; the only invariant would be that higher values are at least as safe, and lower values are at least as fast. -jJ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com