First time here? Check out the FAQ!

Revision history  [back]

TK messagebox hanging after update to Wing 11

I just updated to Wing 11.0.3, and code that was working in Wing 10 is hanging:

import tkinter as tk
from tkinter import messagebox
...
        root = tk.Tk()
        root.withdraw() # Hide the main root window

        result = messagebox.askyesno("title", "question", parent=root)

Any thoughts as to what might be wrong?

UPDATE: Since I just tried the code above independently, and it executes without a problem in Wing 11, I probably need to give more context.

This code is being run during the "import" of the module, not in the if __name__ == "__main__": section of the code (which is just used for testing). This code is a module used by SIL Converters to do script conversion. So when the module is loaded, we want to ask the user a question about how to carry out the conversion, script conversion data is loaded, and then whenever the Convert() function is called, it performs the script conversion on the data passed. In that case, the "__main__" section of the code is never run.

So does Wing 11 handle the "import" of the module differently in some way? I could send my code to the Wing developers for testing if that would help, but don't really want to post it publicly here.

Thanks, Jeff

UPDATE #2: And just to confirm, I ran the script with Wing 10 (which fortunately I hadn't uninstalled yet!), and it worked fine. The same script in Wing 11 hangs on the messagebox command.

TK messagebox hanging after update to Wing 11

I just updated to Wing 11.0.3, and code that was working in Wing 10 is hanging:

import tkinter as tk
from tkinter import messagebox
...
        root = tk.Tk()
        root.withdraw() # Hide the main root window

        result = messagebox.askyesno("title", "question", parent=root)

Any thoughts as to what might be wrong?

UPDATE: Since I just tried the code above independently, and it executes without a problem in Wing 11, I probably need to give more context.

This code is being run during the "import" of the module, not in the if __name__ == "__main__": section of the code (which is just used for testing). This code is a module used by SIL Converters to do script conversion. So when the module is loaded, we want to ask the user a question about how to carry out the conversion, script conversion data is loaded, and then whenever the Convert() function is called, it performs the script conversion on the data passed. In that case, the "__main__" section of the code is never run.

So does Wing 11 handle the "import" of the module differently in some way? I could send my code to the Wing developers for testing if that would help, but don't really want to post it publicly here.

Thanks, Jeff

UPDATE #2: And just to confirm, I ran the script with Wing 10 (which fortunately I hadn't uninstalled yet!), and it worked fine. The same script in Wing 11 hangs on the messagebox command.

TK messagebox hanging after update to Wing 11

I just updated to Wing 11.0.3, and code that was working in Wing 10 is hanging:

import tkinter as tk
from tkinter import messagebox
...
        root = tk.Tk()
        root.withdraw() # Hide the main root window

        result = messagebox.askyesno("title", "question", parent=root)

Any thoughts as to what might be wrong?

UPDATE: Since I just tried the code above independently, and it executes without a problem in Wing 11, I probably need to give more context.

This code is being run during the "import" of the module, not in the if __name__ == "__main__": section of the code (which is just used for testing). This code is a module used by SIL Converters to do script conversion. So when the module is loaded, we want to ask the user a question about how to carry out the conversion, script conversion data is loaded, and then whenever the Convert() function is called, it performs the script conversion on the data passed. In that case, the "__main__" section of the code is never run.

So does Wing 11 handle the "import" of the module differently in some way? I could send my code to the Wing developers for testing if that would help, but don't really want to post it publicly here.

Thanks, Jeff