[Web-SIG] Returned application object and fileno.

Phillip J. Eby pje at telecommunity.com
Wed Sep 1 15:19:50 CEST 2004


At 10:17 AM 9/1/04 +0100, Andrew Eland wrote:
>Alan Kennedy wrote:
>
>>Problem is that jython doesn't support file descriptors, or the fileno() 
>>method. If you invoke fileno() on an org.python.core.PyFile, you get an 
>>Py.IOError("fileno() is not supported in jpython") exception.
>
>I guess the fileno() method could be renamed something like os_file() or 
>os_stream(). CPython could return a file descriptor, Jython could return 
>something like a java.nio.Channel, IronPython could return a 
>System.IO.Stream, or something like that.

No; if developers on those platforms want to support optional 
platform-specific performance boosting, they should define 
platform-specific names for the attribute.  This improves the ease of 
portability for applications: they just provide what they know how to 
provide, and the server only invokes the attribute appropriate to the 
platform, if it invokes any attribute at all.



More information about the Web-SIG mailing list