so, i was trying to make a personal assistant and i wanted to make a reminder type of commnd. here is the code of the reminder(notification). and the speak and takecommand fuctions are custom.
elif "remind" in query:
speak("what should i remind you")
messageT = takeCommand()
speak("ok, so when should i remind you.")
timeOfReminder = takeCommand()
while True:
current_time = tm.strftime("%H:%M:%S")
if current_time == timeOfReminder:
print(current_time)
break;
toaster = ToastNotifier()
toaster.show_toast(messageT,
duration=10)
so the problem is not with this code, but the code contains a while loop which prohibits me to proceed with my code(this whole code is also a part of a while loop which contains all the command). i wanna know how to like run this loop in parellel of the other main while loop(this while loop checks the time while the main while loop checks what command the user is giving.) is there any way to do this (if you want i can post my full code if it helps).
Use the
threading
library in Python 3.import threading
Create a function:
Hope this works for you!