Answers for "is tkinter and Pyqt5's interface the same?"

0

is tkinter and Pyqt5's interface the same?

from tkinter import *
from tkinter.font import BOLD
import time
from playsound2 import playsound
def hello():
    print("Hello there.")
def name():
    print("My name is Powershell")

def youtube():
    print("Finding Link...")
    time.sleep(2)
    print("Processing...")
    time.sleep(5)
    print("Link: youtube.com")
def twitter():
    print("Finding Link...")
    time.sleep(2)
    print("Processing...")
    time.sleep(5)
    print("Link: twitter.com")

def play():
    playsound(r'C:\Users\I MAC\Desktop\Coding Files/cropped out edit.mp3')


def meme():
    print('''So you call these these things chips? Instead of Crispity Crunchy Munchy Crackerjack
     Snacker Nibbler Snap Crack N Pop Westerpoolchestershireshire Queen's Lovley Jubliy Delight? Thats rather bit cringe innit bruv?''')

def job():
    print("I respond to different types of commands inputted by the user. Just like you clicking the buttons to make me respond.")

def how_are_you():
    print('I am doing fine')

def goodbye():
    print("Goodbye")

def quit():
    exit()
root = Tk()
root.geometry('500x500')
root.overrideredirect(True)
root.resizable(False,False)
root.title('Make your terminal say things V1.0')
root.iconbitmap(r'C:\Users\I MAC\Desktop\Coding Files/bot.ico')
root.configure(bg='light blue')
root.bell()
b = Button(root, text='Say Hello', command=hello)
d = Button(root, text='QUIT',font=BOLD, command=quit)
c = Button(root, text='Say Goodbye',command=goodbye)
e = Button(root,text='How are you',command=how_are_you)
f = Button(root,text='Ask Name',command=name)
g = Button(root, text='Ask for a joke', command=meme)
z = Button(root, text="Ask Terminal's Job",command=job)
l = Button(root,text="Youtube Link",command=youtube)
tw = Button(root,text="Twitter Link",command=twitter)
msc = Button(root,text='Play A cool sound',command=play)
k = Label(root, text='Make your terminal say things. V1.0', height=9, width=35)
b.configure(bg='blue')
d.configure(bg='red')
c.configure(bg='blue')
e.configure(bg='blue')
f.configure(bg='blue')
g.configure(bg='blue')
z.configure(bg='blue')
l.configure(bg='blue')
tw.configure(bg='blue')
msc.configure(bg='blue')
k.configure(bg='green')
d.pack()
b.pack()
c.pack()
e.pack()
f.pack()
g.pack()
z.pack()
l.pack()
tw.pack()
msc.pack()
k.pack()
root.mainloop()
Posted by: Guest on September-10-2021

Code answers related to "is tkinter and Pyqt5's interface the same?"

Python Answers by Framework

Browse Popular Code Answers by Language