Update Uptated-Prototype/PiperTTS-GUI-Test.py

This commit is contained in:
2025-12-09 15:17:07 -08:00
parent 3be145a2e2
commit 6dee32bf6e

View File

@@ -138,6 +138,10 @@ def PiperTTS_GUI_TextFile_Open():
with open(Root_Window.filename) as f: with open(Root_Window.filename) as f:
Cursor_Position = Input_Box.index(INSERT) Cursor_Position = Input_Box.index(INSERT)
Input_Box.insert(Cursor_Position, f.read()) Input_Box.insert(Cursor_Position, f.read())
MyTestText = Input_Box.get("1.0","end-1c")
MyTestText2 = "There are {}, lines".format(len(MyTestText.splitlines()))
My_Test_Label2["text"] = MyTestText2
else: else:
print("Canceled file dialog.") print("Canceled file dialog.")
except: except:
@@ -202,7 +206,7 @@ My_Test_Label.grid(row=0, column=0, columnspan=4)
try: try:
try: try:
MyTestText = Input_Box.get("1.0","end-1c") MyTestText = Input_Box.get("1.0","end-1c")
MyTestText2 = len(MyTestText.splitlines()) MyTestText2 = "There are {}, lines".format(len(MyTestText.splitlines()))
except: except:
print("Fuckup again.") print("Fuckup again.")
except: except: