Tkinter Entry widgets 'font' property (API ?) changed in Python 2.5.2 ?

Atul atul.nene at gmail.com
Wed Aug 6 00:01:59 EDT 2008


Hi,

The snippet :

entryFontDescr = Entry()["font"]
print self.entryFontDescr

On Windows XP it displays

{MS Sans Serif} 8

On Suse Linux 10.2 it used to display

TkTextFont 10

I upgraded to OpenSuse 11 and now it shows

TkTextFont

I used this snippet to obtain the default font size for an Entry
widget. Now with an OS upgrade, my code is broken.

The python version on the upgraded box is

~> python
Python 2.5.2 (r252:60911, Jun  6 2008, 23:32:27)
[GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]] on
linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

I dont remember the exact version of Python on the earlier Suse 10.2
box

My questions:

1. Is this not an API change ? I looked up Python's release
documentation and didn't find any mention of the same.
2. How can I achieve what I want alternatively ?

Regards,
-- Atul



More information about the Python-list mailing list