]> granicus.if.org Git - python/commit
handle_system_exit() flushs files to warranty the output order
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 17 May 2010 08:58:51 +0000 (08:58 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 17 May 2010 08:58:51 +0000 (08:58 +0000)
commite9fb319e688d2d76ab4dbf8b3165ce9d1e24e8fc
treee4922f7cec794522aa025616e1d160fcfc79b792
parent372ac5e73260d6e8c8aefe31fd979a7706841868
handle_system_exit() flushs files to warranty the output order

PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr()
writes into the Python object sys.stderr. Each object has its own buffer, so
call sys.stderr.flush() and fflush(stderr).
Lib/test/test_sys.py
Python/pythonrun.c