How to obtain an up-to-date document of tkinter

Terry Reedy tjreedy at
Thu Apr 20 14:12:05 EDT 2017

On 4/20/2017 3:19 AM, Mok-Kong Shen wrote:
> Am 20.04.2017 um 02:16 schrieb breamoreboy at
>> On Thursday, April 20, 2017 at 1:09:45 AM UTC+1, Mok-Kong Shen wrote:
>>> How could one obtain an up-to-date document of tkinter. I ask this
>>> question because apparently there are stuffs of tkinter that
>>> worked in Python 3.5 but no longer in Python 3.6.1.
>> Can you please state what worked in 3.5 but doesn't in 3.6?
> Yes. In Python V.3.5, I simply had the declaration:
> from tkinter import *
> and thereafter I could use in code lines e.g.:
> messagebox.showerror(........)

That was not tkinter behavior.  And it was not the behavior in 2.x.

The above only worked (in 3.x) when running from IDLE, as an undesirable 
side-effect of imports made by IDLE's before running user code. 
It did not work when running with Python directly, and should not have 
according to the language definition.  It was a bug in IDLE that I fixed 
for 3.5.3 (just checked), and 3.6.0.  See
for an explanation.

> However, in Python V.3.6.1,

and 3.6.0 and 3.5.3

> I have to have the declaration: 
> from tkinter import *
> import tkinter.messagebox

as is normal for subpackages

> and thereafter have to use:
> tkinter.messagebox.showerror(........)


from tkinter import messagebox

or even

from tkinter.messagebox import showerror

Terry Jan Reedy

More information about the Python-list mailing list