[Tutor] Closing GUI program

Jim Morcombe jmorcombe at westnet.com.au
Fri Dec 28 08:32:47 CET 2007


Oops!  Here's the program:
---------------------------
from Tkinter import *     

root = Tk()
z = Label(root, text="Hello World!")
z.grid()
root.mainloop()
------------------------------

Jim

  ----- Original Message ----- 
  From: Jim Morcombe 
  To: python tutor mailing list 
  Sent: Friday, December 28, 2007 3:51 PM
  Subject: [Tutor] Closing GUI program


  I have copied the following program.  When I run it, (By pressing F5 from IDLE), it displays the "Hello world" message.

  When I close the window, the "Hello world" message disappears, but it seems that the program is still running, because when I close the shell, i get the message "The program is still running.  Do you want to kill it?"

  How do I get the program to terminate when the window is closed?

  Jim



------------------------------------------------------------------------------


  _______________________________________________
  Tutor maillist  -  Tutor at python.org
  http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071228/f6ecf4e7/attachment.htm 


More information about the Tutor mailing list