On Sat, 15 Nov 2008 19:41:39 -0200 "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
> > When you get a _tkinter.Tcl_Obj it means _tkinter wasn't able to > detect and convert a received tcl object to a python object. When this > happens the best you can do is get the string representation of the > object by doing str(ans2) and then convert the value yourself (if you > want to convert it to something else different than a string). > > With Tcl/Tk 8.5 and the current _tkinter you will see this happening > very often, as tcl/tk now shares objects as much as it can. _tkinter > checks for some specific tcl types but since it may receive any kind > of object, like a pixel object, or bytecode object which are part of > tcl (which happens to contain the same representation, that is why > they got shared) it ends up returning this generic Tcl_Obj. > I also found this behavior quite often with Tk-8.4 on several linux systems, in fact it seemed to me like it is impossible to predict when it will occur so unfortunately the only thing which seems to work reliably is setting Tkinter.wantobjects to False. Michael _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss