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.

classification
Title: OptionMenu class is defined both in Tkinter and Tix
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: isandler, jafo, loewis
Priority: normal Keywords:

Created on 2008-02-10 15:55 by isandler, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg62250 - (view) Author: Ilya Sandler (isandler) Date: 2008-02-10 15:55
Given that Tix imports all names from Tkinter this is likely to result
in confusion.

E.g.

>>> from Tix import *
>>> print Button
Tkinter.Button
>>> print OptionMenu
Tix.OptionMenu

To get to Tkinter's OptionMenu, one needs to do something like

import Tkinter
Tkinter.OptionMenu
msg62255 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-02-10 18:25
What is the issue that you are reporting here? There is nothing wrong
with two classes having the same name, AFAICT. That's what modules are for.
msg62673 - (view) Author: Ilya Sandler (isandler) Date: 2008-02-22 01:53
I understand your argument. Yet, I am not sure classes with the same
name are reasonable here. Tix is too intertwined with Tkinter:

E.g a Tix user user can just access Tkinter widgets via Tix:

>>> import Tix
>>> print Tix.Canvas   # This is TkInter's widget
Tkinter.Canvas

>> import Tix.ComboBox #whoops, we've got Tix's combobox
Tix.ComboBox

As a matter of fact, Tix docs seem to explicitly recommend accessing
Tkinter stuff through Tix:

"""The former imports the latter, so to use Tix with Tkinter, all you
need to do is to import one module. In general, you can just import Tix,
and replace the toplevel call to Tkinter.Tk with Tix.Tk"""
msg64129 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2008-03-20 00:01
I don't see the problem with the example listed in the last message.  It
sounds like the Tix documentation is confirming that this is the desired
behavior.
History
Date User Action Args
2022-04-11 14:56:30adminsetgithub: 46335
2008-03-20 00:01:35jafosetstatus: open -> closed
nosy: + jafo
resolution: works for me
messages: + msg64129
priority: normal
2008-02-22 01:53:16isandlersetmessages: + msg62673
2008-02-10 18:25:01loewissetnosy: + loewis
messages: + msg62255
2008-02-10 15:55:39isandlercreate