The approach I used in the patch seems to
be a much cleaner solution, unless I'm missing
something here.  That is is only a partial
solution is only because I didn't invest the
time to figure out why open() doesn't go
through new_impl (which seems odd to me
that it doesn't).  And then there's the
open methods on the __builtin__ class
which don't seem to get called at all
(what are they for?).  Perhaps the design
changed but wasn't cleaned up.

-Clark

-----Original Message-----
From: Frank Wierzbicki [mailto:fwierzbicki@gmail.com]
Sent: Sat 6/11/2005 8:04 PM
To: brian zimmer
Cc: Updike, Clark; JythonDevelopers
Subject: Re: PyFile constructors in jython

If we do decide to use the new keyword approach, what about adding the
keyword "filewrapper" and use PyFile.FileWrapper (and its subclasses)
for the various streams.  This would keep us from needing a new
keyword to support RandomAccessFile, the nio channel stuff etc.  Then
we could write code like

fw = PyFile.InputStreamWrapper(inputstream)
pf = file(filewrapper(fw))

Thoughts?
Frank