using get() with Entry()

Eric Brake ebrake2002 at yahoo.com
Fri Apr 19 21:47:38 EDT 2002


I've looked through all of the documentation I can find. I can't make
get() work with Entry().

Here's my code:
###
guess = StringVar()
guessbox = 0
guessbox= Entry(root, width=20, textvariable=guess).pack()
guess.set(guessbox.get(guessbox))
###

It keeps giving me a error message saying:
Traceback (most recent call last):
  File "D:\My Documents\mymodules\gui\guessthenumber.py", line 43, in
?
    guess.set(guessbox.get(guessbox))
AttributeError: 'NoneType' object has no attribute 'get'

What am I not doing? I just now learning this so break it down,
Please.
Thank you for your help



More information about the Python-list mailing list