[Python-Dev] Tkinter problems with Tcl/Tk 8.5 (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Tue Jan 1 22🔞51 CET 2008


It seems very peculiar how the text widget's bbox is returning a Python-like list and therefore breaking the Tcl callback. I haven't thus far been able to determine which python method is causing that, or if it's something related to the hooks you have added. The same problem doesn't occur with 8.4.

I have now studied this in detail, and fixed it in Python's trunk; see the tracker item for details.

In short:

The fix is to return an ObjResult to Tcl from a Python callback. I'm skeptical about back-porting this to 2.5, as it may affect behavior. So for 2.5, we probably have to recommend not using Tk 8.5.

There are a number of additional incompatible changes. For example, text::index returns textindex objects now, where it used to return strings. I have fixed that in Tkinter, which converts the textindex back to a string. I'm sure there are other places where Tk 8.5 will break existing Tkinter applications.

Regards, Martin



More information about the Python-Dev mailing list