From 2049c11d4f2f1b2bfa48c23b9eba6cb1babfc812 Mon Sep 17 00:00:00 2001 From: nasrlol Date: Mon, 9 Dec 2024 21:30:52 +0100 Subject: trying out a fix for the input handling with curses --- source/features.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/features.py') diff --git a/source/features.py b/source/features.py index 7690feb..2d2d80e 100644 --- a/source/features.py +++ b/source/features.py @@ -3,6 +3,7 @@ import os import speech_recognition as sr from gpiozero import CPUTemperature import hardware_driver as lcd # importing the ./hardware_driver.py file +from main_cli import input_handling # some functions need to be put on a different thread but we are keeping that project for another time # import threading @@ -63,7 +64,7 @@ class feat: def custom_greeting(self): self.clear_terminal_lcd() try: - with open("quotes.txt", "r") as file: + with open("../assets/text/quotes.txt", "r") as file: quotes = [quote.strip() for quote in file.readlines()] except FileNotFoundError: L.text("Quotes file missing", 1) @@ -152,11 +153,11 @@ class feat: print("Error:", e) return None - def save_notes(self): + def save_notes(self, input_handling): self.clear_terminal_lcd() print("Type your notes (type 'stop' to exit):") while True: - note = input(": ") + note = input_handling(": ") if note.lower() in ["stop", "exit", "quit"]: break first_line = note[:16] -- cgit v1.2.3-70-g09d2