This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author klappnase
Recipients gpolo, klappnase, serhiy.storchaka
Date 2013-03-18.19:05:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363633527.93.0.788483472049.issue17397@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, I happen to encounter these TclObjects occasionally, e.g. (not tested with the latest python):

$ python3
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
>>> from tkinter import ttk
>>> r=Tk()
>>> p=ttk.Progressbar(r)
>>> p.cget('mode')
<index object at 0x879d338>
>>> print(p.cget('mode'))
determinate
>>> p.cget('mode') == 'determinate'
False
>>> str(p.cget('mode')) == 'determinate'
True
>>> 

In Python2 the easiest way to work around this imho is to set wantobjects to 0, however this does not seem to work in Python3 anymore, not sure if this is for some reason intentional or deserves another bug report:

$ python3
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.wantobjects = 0
>>> from tkinter import ttk
>>> r=tkinter.Tk()
>>> p=ttk.Progressbar(r)
>>> p.cget('mode')
''
>>>

To be honest, since these TclObjects never seem to work reliably I had preferred it a lot if they would have been turned off by default.
History
Date User Action Args
2013-03-18 19:05:27klappnasesetrecipients: + klappnase, gpolo, serhiy.storchaka
2013-03-18 19:05:27klappnasesetmessageid: <1363633527.93.0.788483472049.issue17397@psf.upfronthosting.co.za>
2013-03-18 19:05:27klappnaselinkissue17397 messages
2013-03-18 19:05:27klappnasecreate