[docs] [issue13553] Tkinter Tk args and Gnome Shell application name

Terry J. Reedy report at bugs.python.org
Tue Aug 5 22:23:41 CEST 2014

Terry J. Reedy added the comment:

The resolution of this issue should be to properly document the Tk class. The 3.4 docs currently say:

"class tkinter.Tk(screenName=None, baseName=None, className='Tk', useTk=1)
    The Tk class is instantiated without arguments. This creates a toplevel widget of Tk which usually is the main window of an application. Each instance has its own associated Tcl interpreter."

The signature is incomplete -- see below. The first sentence is wrong; there are arguments, they just all happen to have defaults. The next sentence should be something like "Return a toplevel Tk widget, which is usually the main window of an application."

Tk.__doc__ is 'Toplevel widget of Tk which represents mostly the main window\n    of an application. It has an associated Tcl interpreter.'  This is probably ok.

Tk.__init__ signature and Tk,__init__.__doc__ are

__init__(self, screenName=None, baseName=None, className='Tk', useTk=1, sync=0, use=None)

"Return a new Toplevel widget on screen SCREENNAME. A new Tcl interpreter will
be created. BASENAME will be used for the identification of the profile file (see
It is constructed from sys.argv[0] without extensions if None is given. CLASSNAME
is the name of the widget class."

"Toplevel" should be "toplevel" as in : Tk is not a subclass of Toplevel. Rather Toplevel is similar to Tk but with the BaseWidget signature.

The argument list needs to be completed and perhaps a bit more said about the one documented. Does 'screen' apply to anything other than X11? Could it be used on Windows to put the window on a secondary screen? Is Gnome the only user framework that uses classname?

assignee:  -> docs at python
components: +Documentation
nosy: +docs at python, serhiy.storchaka, terry.reedy
stage:  -> needs patch
title: Tkinter doesn't set proper application name in Gnome Shell -> Tkinter Tk args and Gnome Shell application name
versions: +Python 3.4, Python 3.5 -Python 3.2

Python tracker <report at bugs.python.org>

More information about the docs mailing list