Comments on: Python gotcha http://eikke.com/python-gotcha/ 'cause this is what I do Tue, 04 Dec 2012 00:03:23 +0000 hourly 1 http://wordpress.org/?v=3.4.1 By: Eugene http://eikke.com/python-gotcha/comment-page-1/#comment-11748 Eugene Tue, 21 Oct 2008 19:49:41 +0000 http://eikke.com/python-gotcha/#comment-11748 I am looking for some idea and stumble upon your posting :) decide to wish you Thanks. Eugene I am looking for some idea and stumble upon your posting :) decide to wish you Thanks. Eugene

]]>
By: willem http://eikke.com/python-gotcha/comment-page-1/#comment-10000 willem Tue, 30 Sep 2008 14:44:21 +0000 http://eikke.com/python-gotcha/#comment-10000 Josh is right. This is normal behavior. You should make it a habit to dup() the file descriptor :) Josh is right. This is normal behavior. You should make it a habit to dup() the file descriptor :)

]]>
By: Josh Stone http://eikke.com/python-gotcha/comment-page-1/#comment-9726 Josh Stone Fri, 26 Sep 2008 21:46:26 +0000 http://eikke.com/python-gotcha/#comment-9726 The issue has nothing to do with Python per se -- that's the way fdopen() is defined in libc. The man-page directly says, "The file descriptor is not dup’ed, and will be closed when the stream created by fdopen() is closed." But yes, I can see how this might be a surprising effect... The issue has nothing to do with Python per se — that’s the way fdopen() is defined in libc. The man-page directly says, “The file descriptor is not dup’ed, and will be closed when the stream created by fdopen() is closed.”

But yes, I can see how this might be a surprising effect…

]]>