Tkinter error
- From: BartlebyScrivener <bscrivener42@xxxxxxxxx>
- Date: 28 May 2007 14:35:07 -0700
Finally started trying to build a simple gui form for inserting text
data into a mysql db of quotations.
I found this nice Tkinter tutorial,
http://www.ibiblio.org/obp/py4fun/gui/tkPhone.html
but midway I'm getting an error.
from Tkinter import *
win = Tk()
f = Frame(win)
b1 = Button(f, "One")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1936, in __init__
Widget.__init__(self, master, 'button', cnf, kw)
File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1859, in __init__
BaseWidget._setup(self, master, cnf)
File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1839, in _setup
if cnf.has_key('name'):
AttributeError: 'str' object has no attribute 'has_key'
.
- Follow-Ups:
- Re: Tkinter error
- From: Peter Otten
- Re: Tkinter error
- Prev by Date: Re: itertools.groupby
- Next by Date: Re: ten small Python programs
- Previous by thread: ANN: IPyKit, the standalone IPython prompt
- Next by thread: Re: Tkinter error
- Index(es):