Proposed extension to file constructor

Taral taral at taral.net
Wed Jun 4 02:20:52 EDT 2003


On Tue, Jun 03, 2003 at 02:40:28PM -0500, Skip Montanaro wrote:
> 
>     taral> I needed to extend popen functionality, so I modified the file
>     taral> constructor to optionally take a file descriptor. It was, in my
>     taral> opinion, the minimum way to do it while preserving isinstance(x,
>     taral> file).
> 
> Where are you getting file descriptors?  What's wrong with using os.fdopen
> to wrap a file descriptor in a file object?
> 
>     fdopen(...)
>         fdopen(fd [, mode='r' [, bufsize]]) -> file_object
> 
>         Return an open file object connected to a file descriptor.

I can't subclass fdopen.

-- 
Taral <taral at taral.net>
This message is digitally signed. Please PGP encrypt mail to me.
"Most parents have better things to do with their time than take care of
their children." -- Me
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030604/04000de9/attachment.sig>


More information about the Python-list mailing list