-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
39 lines (33 loc) · 946 Bytes
/
main.py
1
from tkinter import *from calc_core import Coreimport threadingdef gui_process(): fkt = Tk() fkt.geometry("375x615") fkt.title("Simple Calculator With Voice") # fkt.iconbitmap("calculator.ico") fkt.configure(bg="white") fkt.resizable(0, 0) # call core engine engine = Core() engine.dispaly(fkt) fkt.bind('<KeyPress>', engine.keystrokes) fkt.bind('<Return>', engine.callback) engine.set_menu(fkt) engine.set_buttons(fkt) # call Gui fkt.mainloop()def voice_command(): engine = Core() engine.get_voice_input()class Calculator(): # initializing Tkinter & Setting Window # process_one = threading.Thread(target=gui_process) process_two = threading.Thread(target=voice_command) # process_one.setDaemon(True) # process_one.start() process_two.setDaemon(True) process_two.start() # process_one.join() # process_two.join() gui_process()