STINNER Victor added the comment: initstdio() is supposed to handle EBADF: see issue #24891. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue30225> _______________________________________