Python sys.stderr flush frequency
问题 How often does sys.stderr flush its buffer, and is this standard among different environments? >>> import sys >>> sys.__stderr__ <open file '<stderr>', mode 'w' at 0x2b4fcb7ac270> I see that it is just a standard file type, but I don't know what value of buffering it's supposed to be. dir() does not seem to yield any useful information either. 回答1: On Python 2, I can't find where in the documentation sys.stderr 's buffering is specified. I'd expect the same behaviour as stderr in C that is