[Python-3000] PEP 368: Standard image protocol and class
"Martin v. Löwis"
martin at v.loewis.de
Sun Jul 1 18:55:42 CEST 2007
>> The only way to get compatibility between the libraries is to create
>> an image library in C _and_ get those libraries to start using it.
>>
>
> They'll all quack the same way. (This is paraphrased in the PEP's
> abstract, as far as I read it.)
To the Python side, yes. But to the underlying C library, some
quack, some bark.
How would you pass a Tkinter.PhotoImage to wxPython if both
supported the PEP? wxPython would likely be able to produce
objects that provide the Image interface, but I can't see how
wxPython could consume such a thing - the underlying C libraries
surely expect something completely different.
The only way I can see this work is if each library imports
Image objects by copying them, pixel for pixel, through this
interface.
Regards,
Martin
More information about the Python-3000
mailing list