Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- class MyApp(tk.Tk):
- def __init__(self, *args, **kwargs):
- tk.Tk.__init__(self, *args, **kwargs)
- def hello():
- print("hello2")
- submit_button = tk.Button(self, text="Submit", command=lambda:
- MyApp.test1())
- submit_button.pack()
- def test1():
- print("hello")
- MyApp.hello()
- if __name__ == "__main__":
- app = MyApp()
- app.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement