[Tutor] Tkinter problem

bembry@westhost33.westhost.net bembry@westhost33.westhost.net
Fri, 5 Apr 2002 14:48:20 -0600 (CST)


Also, if you are running the code from inside IDLE, the root.mainloop() 
can cause it to lock things up.  If you are running from shell or command 
line, you'll be fine (which is what it looks like), but from IDLE it can 
cause a mess. 

Bryce

On Fri, 5 Apr 2002, Brian Callahan wrote:

> Hi everyone.  I'm trying to learn Tkinter right now
> and I've run into a problem.  One of my examples is to
> create a button widget.  I've entered the code and
> when I try to run it, it tells me that I have a syntax
> errors and points to the button event.  I've tripple
> checked the code to make sure I didn't type anything
> wrong.  Any other suggestions??? I'm including a copy
> of the code. Thanx.
> #!/usr/local/bin/python
> 
> import sys
> from Tkinter import *
> 
> def die(event):
>     sys.exit(0)
> 
> root = Tk()
>  button = Button(root)
>  button["text"] = "Ave atque vale!"
>  button.bind("<Button-1>", die)
>  button.pack()
>  root.mainloop()
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>