Can't restart Tkinter after a quit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • llaves
    New Member
    • Jul 2010
    • 4

    Can't restart Tkinter after a quit

    In my button handler I mistakenly typed quit() instead of root.quit() (where root is the window). This caused Idle to shut down (as one might expect). What I don't understand is that when I restart Idle Tkinter no longer will display windows. I have to reboot to clear whatever is wrong. I'm guessing I've orphaned some process related to Tkinter that Idle isn't connecting to, or some such.

    How do I clear this state?
    I'm running Idle on Windows Vista.

    Thanks.
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Check to see if the process is still running in the background. If so, end the process with Task Manager and it should start again properly.

    Comment

    • llaves
      New Member
      • Jul 2010
      • 4

      #3
      I couldn't find a process or service with python or Tk in the process name. Could it have some oddball name I wouldn't recognize?

      Comment

      • bvdet
        Recognized Expert Specialist
        • Oct 2006
        • 2851

        #4
        pythonw.exe is the process that runs Idle. I was guessing what the problem might be. I can't duplicate the problem on my system. I am using a old version on XP though. Are you receiving any error message when Idle shuts down?

        Comment

        • llaves
          New Member
          • Jul 2010
          • 4

          #5
          no error msgs, nothing. All the Idle windows close down, as well as the Tkinter window I created. In a sense, this is presumably the correct behavior on encountering a quit, except for the part about not being able to open a new window in a new session.

          Comment

          • llaves
            New Member
            • Jul 2010
            • 4

            #6
            Apparently the problem has something to do with the subprocess that Idle connects to. If I try to run the program by opening Idle, then editing the file and running it, I get nothing. However, if I right-click the file in the Explorer window and click Edit with Idle, my program can create and manage Tkinter windows. From what I read, this method launches Idle without a subprocess, hence my conjecture that I've done something to wreck Idle's ability to communicate with some essential subprocess.

            Comment

            Working...