How to Actually Save Items to Calendar


#1

So I’ve been able to successfully code and run the program and I am very happy with how it turned out. I may even try to add onto it to make it look extra nice and cute. However, a problem I’ve had was that the key/value pairs I would add to the calendar wouldn’t stay in the calendar dictionary, and every time I run the program the calendar returns to being empty. I’m wondering whether there is a way to prevent this, or if I myself have to go into the code and add in my dates and events. If anyone can help me, that would be great.


#2

running programs are stored in RAM (random access memory), and once the program exit, the memory is given back to the operating system. To make data persist, you would need to write to the hard drive. So you could write/append output to a file, and then at the next startup of your program, read data from the file. Or you could use a database. Python has libraries for this.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.