On Mon, Dec 15, 2008 at 11:18 AM, Tom Wright <[email protected]> wrote: > Agreed. It is certainly possible with some work to get a file descriptor and > pass it to C code. > > This is not the problem, however. Ironclad's aim (eventually) is to allow > *arbitrary* C extensions to work with Ironpython without changing the > extensions. Ctypes aim is to allow arbitrary C code to be run by python > (possibly in other python libraries which you really don't want to modify). > > In CPython .fileno() is a file descriptor and some modules use this fact > (specifically PIL) by passing file descriptors as integers into C code. I do > not know how one can make this code work in IronPython unless .fileno() > returns a file descriptor. > > The game here is not making a particular C library work with IronPython by > modifying this library but making as many libraries as possible work without > modification. Of course whether this is worthwhile depends on how many > libraries rely on this fact. > > Sorry - I hope this is a little clearer. > > Tom
How does CPython get the file descriptor for fileno()? Does it just return the HANDLE on Windows? slide _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
