File size: 1,351 Bytes
75487c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# from tkinter import *
# root = Tk()
# root.geometry("500x500+0+0")
# frmMain = Frame(root,bg="blue")
#
# startbutton = Button(frmMain, text="Start",height=1,width=4)
# startbutton.grid()
#
# #Configure the row/col of our frame and root window to be resizable and fill all available space
# frmMain.grid(row=0, column=0, sticky="NESW")
# frmMain.grid_rowconfigure(0, weight=1)
# frmMain.grid_columnconfigure(0, weight=1)
# root.grid_rowconfigure(0, weight=1)
# root.grid_columnconfigure(0, weight=1)
#
# root.mainloop()


# import speech_recognition as sr
# r = sr.Recognizer()
# with sr.Microphone() as source:
#     print("Speak Anything")
#     audio = r.listen(source,phrase_time_limit=5)
#     try:
#         text = r.recognize_google(audio)
#         print("You said : {}".format(text))
#     except:
#         print("Sorry could not recognize what you said")


#Import tkinter library
from tkinter import *
#Create an instance of Tkinter frame or window
win= Tk()
#Set the geometry of tkinter frame
win.geometry("750x250")
#Make the window sticky for every case
win.grid_rowconfigure(0, weight=1)
win.grid_columnconfigure(0, weight=1)
#Create a Label
label=Label(win, text="This is a Centered Text",font=('Aerial 15 bold'))
label.grid(row=2, column=0)
label.grid_rowconfigure(1, weight=1)
label.grid_columnconfigure(1, weight=1)
win.mainloop()