Answers for "python gui api"

4

python gui

import tkinter as tk
#Importing the main module
window = tk.Tk()
window.mainloop()
Posted by: Guest on October-04-2020
2

python gui builder

from tkinter import *

def changel():
    if l['text']!='Stop it!':
        l['text']='Stop it!'
    else:
        l['text']='Are you over?'

w = Tk()
l = Label(w,text = 'GUI Interface')
b = Button(w,text = 'A normal button',command = changel )
t = w.title('A normal window')
l.pack()
b.pack()
w.mainloop()
Posted by: Guest on April-08-2020

Python Answers by Framework

Browse Popular Code Answers by Language