Code: Select all
from tkinter import *
class App:
def _init_(self, master):
frame = Frame(master)
frame.pack()
Label (frame, text='deg C').grid(row=0, column=0)
button = Button(frame, text='Convert', command=self.convert)
button.grid(row=1)
def convert(self):
print('Not Implemented')
root = Tk()
root.wm_title('Temp Converter')
app = App(root)
root.mainloop()
Traceback (most recent call last):
File "C:/Users/Steve/Desktop/Python/Hello.py", line 17, in <module>
app = App(root)
TypeError: object() takes no parameters