[IronPython] IronPython and file descriptors

Tom Wright tom.wright at resolversystems.com
Mon Dec 15 17:03:38 CET 2008


Hi,

At the moment file.fileno() returns an arbitrary identifier of a python 
file rather than a true file descriptor. This is semi-blocking the 
Ironclad port of PIL.

Code in PIL gets an integer using fileno() and passes it directly to C 
code where a call to write() is made. To fix this  one would have to 
patch PIL, IronPython's file objects or the write function provided to C 
code - none of these feel like a good course of action.

When ctypes is ported to IronPython this may create similar problems. 
Ideally fileno() would return a real file descriptor. Would this be 
possible?

Thanks,

Tom
Resolver Systems



More information about the Ironpython-users mailing list