From the course: Intermediate Python for Non-Programmers
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Pickling the to-do project - Python Tutorial
From the course: Intermediate Python for Non-Programmers
Pickling the to-do project
- [Instructor] All right, here we are, the final video. We are going to take our existing ToDo project and then add pickling into it so that you can see how that works and have a nice practical example here. So, since we're going to be changing this a lot, I'd like to remake this file. In fact, I'm just going to right-click this here and say Duplicate. You could also just copy and paste. But I'm just going to call this todos_pickle so that we know the difference between the two. Also, inside of this todos_pickle, I'm going to change the file that we're saving this to and say this is going to be called todo_pickle_data, just so that we have different places where we're storing the data and we can take a look at each of them, okay? First, most important thing, we've got to import pickle here. Okay, got that. The next step for us is then when we're reading this file, remember again, we've got to work and say, you know, this is going to be a binary file so we got to add that b there. In…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.