Re: Tkinter grid_info()

Michael Lange <[email protected]>
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
Hi Paul,

On Wed, 18 Feb 2015 20:52:06 +0200
Paul Malherbe <[email protected]> wrote:

> Hi Michael
> 
> I tried using wantobjects=False but found that it broke too many other
> things like e.g. cget['size'], cget['width'], Treeview selection and
> some others. I found that in this case it was easier to create my own
> geom_info function.

glad to hear that everything works for you now.
Of course you are right, changing this in an existing project is likely
to cause quite a bunch of side effects. I usually set wantobjects to
False right from the start, then it does not add much cost to use calls
like int(cget('size')) etc. Maybe "ad hoc" type-conversions as these have
an impact on performance in some situations, if really a lot of them have
to be done, but I never experienced any problems of that kind.

Regards

Michael

> 
> Paul
> 
> On 18/02/2015 19:04, Michael Lange wrote:
> > On Wed, 18 Feb 2015 14:49:14 +0200
> > Paul Malherbe <[email protected]> wrote:
> >
> >> Hi Jeff
> >>
> >> The problem seems to have occurred with version 2.7.6 of python in
> >> linux.
> > I always found it impossible to predict the occurence of these
> > TclObjects, it seems to me that they depend on a combination of Python
> > and Tcl/Tk versions that are not fully compatible, this is why I
> > recommend setting wantobjects to False when writing code that is
> > supposed to work on different systems, with unknown Python/Tk
> > combinations.
> >
> > Btw, I think I read somewhere that wantobjects = False is supposed to
> > work now with recent versions of Python3, too (never tested it myself,
> > though)
> >
> > Regards
> >
> > Michael
> >
> >
> >> Paul
> >> Signature
> >> On 17/02/2015 22:31, Jeff Epler wrote:
> >>> Not reproduced on:
> >>>     Python 2.7.3 (default, Mar 13 2014, 11:03:55) 
> >>>     [GCC 4.7.2] on linux2
> >>> (Debian Wheezy amd64 with python 2.7.3-6+deb7u2, tcltk 8.5.11-2)
> >>>
> >>> $ python /tmp/Malherbe.py 
> >>> row: 0 column: 0
> >>>
> >>> Jeff
> >>>
> >> _______________________________________________
> >> Tkinter-discuss mailing list
> >> [email protected]
> >> https://mail.python.org/mailman/listinfo/tkinter-discuss
> >
> >
> > .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-.
> > --- ... .--. . .-.
> >
> > Totally illogical, there was no chance.
> > 		-- Spock, "The Galileo Seven", stardate 2822.3
> > _______________________________________________
> > Tkinter-discuss mailing list
> > [email protected]
> > https://mail.python.org/mailman/listinfo/tkinter-discuss
> >
> 



.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

One does not thank logic.
		-- Sarek, "Journey to Babel", stardate 3842.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.