Python Forum
[Tkinter] Window unresponsive when executed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Window unresponsive when executed.
#1
I ran the following code in Spyder with Python3 interpreter in windows7.

import tkinter
import tkinter.simpledialog

root = tkinter.Tk()

name = tkinter.simpledialog.askstring('Name','entername')

After I enter the name in prompt and click OK the tk window get unresponsive. Finally when I close the window after many clicks the Kernel dies and is restarted. Please tell me why this happens and a way to fix it.
Reply
#2
You should have root.mainloop() in there somewhere, so the gui will listen to os events (like the CloseWindow event).
Reply
#3
there are some examples here: http://nullege.com/codes/search/tkinter.simpledialog
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 341 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  Application becomes unresponsive as soon as i use the buttons AX_LEARNS 2 715 May-26-2023, 03:33 AM
Last Post: deanhystad
  [Tkinter] program unresponsive during pynput mouse click RobotTech 1 3,432 May-07-2020, 04:43 PM
Last Post: RobotTech
  [Tkinter] messagebox is not being executed please help erwinsiuda 2 2,240 Apr-02-2020, 01:56 AM
Last Post: Larz60+
  tkinter window and turtle window error 1885 3 6,619 Nov-02-2019, 12:18 PM
Last Post: 1885
  update a variable in parent window after closing its toplevel window gray 5 8,974 Mar-20-2017, 10:35 PM
Last Post: Larz60+
  [WxPython] Which def is executed? merlem 10 7,717 Feb-10-2017, 11:28 AM
Last Post: Yoriz
  [xbmc] How to block the code from executed twice under the loop chris0147 29 22,759 Oct-26-2016, 05:34 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020