A Small Tkinter Problem on Windows NT 4.0

mcravitz at yahoo.com mcravitz at yahoo.com
Tue May 1 16:32:16 EDT 2001

The following 3-line python script runs without error in the Python 
shell and in PythonWin (Mark Hammond's interactive Python Development 

from Tkinter import *
root = Tk()
frame = Frame( root )

However, if I place these 3 lines in a file called D:\MyStuff\test.py 
and invoke the script from a Windows NT 4.0 command prompt I get the 
following error.

D:\python d:\MyStuff\test.py
Traceback (most recent call last):
  File "d:\MyStuff\test.py", line 3, in ?
    frame = Frame( root )
  File "d:\python20\lib\lib-tk\Tkinter.py", line 2243, in __cnfmerge__
    cnf = _cnfmerge((cnf, kw))
  File "d:\python20\lib\lib-tk\Tkinter.py", line 75, in __cnfmerge__
    if type(cnfs) is DictionaryType
NameError: There is no variable named 'DictionaryType'

What changes can I make to the script and/or the python command to 
avoid this problem. Thanks very much.

Mike Cravitz

More information about the Python-list mailing list