Fan Decheng <fandecheng at gmail.com> added the comment: Perhaps using just one read() is enough? I mean perhaps no loop is necessary? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue5505> _______________________________________