This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dhoulder
Recipients
Date 2004-11-17.23:43:39
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1119185

In an ideal world I'd propose replacing the guts of
file_wrapper() and file_dispatcher() by my pipe_wrapper()
and PipeDispatcher(), since the general problem of closing
the file descriptor behind the python object applies to all
python objects that are based on a file descriptor, not just
pipes.

So, yes, probably best not to call it pipe_dispatcher(). And
I guess file_dispatcher() may be in use by other peoples'
code and changing it to take a file object rather than an fd
will break that.

Maybe file_dispatcher.__init__() could be changed to take
either an integer file descriptor or a file object as it's
argument, and behave like the current file_dispatcher() when
given an fd, and like pipe_dispatcher() when given a
file-like object (i.e. any object with fileno() and close()
methods will probably be enough). I'm happy to whip up an
example if people think that's a good idea.
History
Date User Action Args
2007-08-23 14:26:06adminlinkissue1025525 messages
2007-08-23 14:26:06admincreate