Éric Araujo added the comment: Thank you for your effort! Note that distutils uses try:... finally: fp.close(), so it tries to avoid the FD leak issues. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue22825> _______________________________________