First, this is not homework - it's a program I am writing for my wife's pet sitting business. Basically, it's a calendar program where I can add or remove pets that will be boarding with us. All of the basic functions work - adding pets, removing pets, etc. The problem I am having is the read and write functions using pathlib and a text file named boarders with a dictionary.
The structure of the dictionary is: boarders[brdr_year][brdr_month][brdr_day]{pet_name}
This is what I have written so far for to retrieve the contents of the file and put in the dictionary but honestly have no idea of how to proceed:
Thanks
The structure of the dictionary is: boarders[brdr_year][brdr_month][brdr_day]{pet_name}
This is what I have written so far for to retrieve the contents of the file and put in the dictionary but honestly have no idea of how to proceed:
def open_file(): data_folder = Path.cwd() print(data_folder) path = data_folder / "boarders.txt" print(path) if str(path.exists()): print("File Does Exist") print(boarders) else: print("File Doesn't Exist")Any help would be appreciated greatly.
