[Tkinter] Using tkinter in Spyder - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [Tkinter] Using tkinter in Spyder (/thread-20043.html) |
Using tkinter in Spyder - Mocap - Jul-25-2019 tkinter isn't working on Spyder for some reason. do I have to uninstall it? import tkinter as tkr tk = tkr.Tk() canvas = tkr.Canvas(tk, width=500, height=500) canvas.grid() tk.mainloop() def donothing(): filewin = Toplevel(root) button = Button(filewin, text="Do nothing")The last two lines have the yellow triangle with the exclamation mark, indicating some kind of an undefined root. I had a normal terminal that was not an IDE and everything was working fine, but now it's not working.. RE: Using tkinter in Spyder - Yoriz - Jul-25-2019 The code has the following problems that is nothing to do with spyder not letting it work.
|