Python Forum
[Tkinter] should not be getting this exception...confused
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] should not be getting this exception...confused
#2
Post whole code as import is missing.
So to fix it i guess Buttons should be Button.
import tkinter as tk
from tkinter import Button

if __name__ == '__main__':
    root = tk.Tk()
    b = Button(root)
    root.mainloop()
Quote:I am trying to learn python class programming
Code over is not class programing,look at A Simple Hello World Program
So here use a class which is always advisable to use when doing GUI programming.
Reply


Messages In This Thread
RE: should not be getting this exception...confused - by snippsat - May-29-2021, 10:42 AM

Forum Jump:

User Panel Messages

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