Guido van Rossum added the comment: Sorry, I was wrong about the encoding leak; you fixed that. The FILE/fd issue is real though. __________________________________ Tracker <report at bugs.python.org> <http://bugs.python.org/issue1267> __________________________________