Python Forum
[Tkinter] Using tkinter in Spyder
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Using tkinter in Spyder
#1
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..
Reply


Messages In This Thread
Using tkinter in Spyder - by Mocap - Jul-25-2019, 02:45 AM
RE: Using tkinter in Spyder - by Yoriz - Jul-25-2019, 05:27 AM

Forum Jump:

User Panel Messages

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