In this section, we will see how to create a birthday reminder application using Python.
Create an application using Python that can check if there is a birthday on the current day or not. If it is the birthday of any of the listed persons, send a notification to the System with the name of this person.
We need a file in which we can save the date and month, as well as the person`s name as a search file for this applications. The file will look like &
Here we transform this application into a bootable application that starts at system startup.
Steps to create a birthday reminder application
importos, time #Take the birthday lookup file from home directory file_path = os.getenv (`HOME`) +` / birth_day_lookup.txt` defcheck_birthday (): lookup_file = open (file_path, `r`) #open the lookup file as read mode today = time.strftime (`% d-% B`) #get the todays date as dd-Month format bday_flag = 0 #loop through each entry in th e birthday file, and check whether the day is present or not for entry inlookup_file: if today in entry: line = entry.split (``) #cut the line on spaces to get name and surname bday_flag = 1 os.system (` notify-send "Today is` + line  + `` + line  + `` s Birthday "`) ifbday_flag == 0: os.system (`notify-send" No birthday for today is listed "` ) check_birthday ()
sudochmod + x file_name.py
sudocp file_name.py / usr / bin