Update Uptated-Prototype/PiperTTS-GUI-Test.py
This commit is contained in:
@@ -226,18 +226,22 @@ except:
|
||||
print("Mkay did not work.")
|
||||
#
|
||||
def OnKeyPress(event):
|
||||
print("Start OnKeyPress")
|
||||
start_time = time.time()
|
||||
Test_var.set("There are {}, lines".format(len(Input_Box.get("1.0","end-1c").splitlines())))
|
||||
print("The Binding Function Was Called!")
|
||||
end_time = time.time()
|
||||
print(f'Elapsed Time: {end_time - start_time} seconds')
|
||||
print("End OnKeyPress")
|
||||
#
|
||||
def OnKeyPress2nd(event):
|
||||
print("Start OnKeyPress2nd")
|
||||
start_time = time.time()
|
||||
print("displaylines:", Input_Box.count("1.0", "end", "displaylines"))
|
||||
print("lines:", Input_Box.count("1.0", "end", "lines"))
|
||||
Test_var.set("There are {}, displaylines".format(Input_Box.count("1.0", "end", "displaylines"))
|
||||
#print("displaylines:", Input_Box.count("1.0", "end", "displaylines"))
|
||||
#print("lines:", Input_Box.count("1.0", "end", "lines"))
|
||||
end_time = time.time()
|
||||
print(f'Elapsed Time: {end_time - start_time} seconds')
|
||||
print("End OnKeyPress2nd")
|
||||
#
|
||||
Input_Box.bind("<Return>", OnKeyPress2nd)
|
||||
Input_Box.bind("<Alt-KeyPress-Return>", OnKeyPress)
|
||||
|
||||
Reference in New Issue
Block a user