If you're following along, you have a file called
main.py with some Python code that prints four tasks out on a screen. I understand that this is not much of a task manager yet! We'll get there.
First, though, let's tidy things up. A programming project needs a place to live, and (for reasons that will become clear) that place needs to be separated from the rest of the world. So! Please make a folder and put only that
main.py file in it. I'm calling my folder
veery, because (i) I like to name software projects after birds and, relatedly, (ii) it's very hard to see the future of a software project. Giving it a memorable but not literally descriptive name removes one extra burden (that of changing the name) if this project turns into something that is not (only) a task manager. (This goes for companies, too!)
So you should have a directory that looks like this:
(This is a "tree diagram" or "tree structure" of a directory. It's worth learning how to read these if you don't yet know.)
And here we encounter another bedrock principle of making software: As often as is practical, test to ensure that your changes haven't broken anything. If you keep your workplace tidy, you should be able to do this very very often. Fixing software is hard, and testing often is the best way to narrow down sets of causes.
So! However you're running
main.py, try to run it again, and make sure you get the same output as you did before. (If you're running Python from the command line, you might need to do something like
python3 veery/main.py instead of
python3 main.py, or maybe not. If you're using an IDE that lets you just click a button, then click the button again! If you get error messages you can't decipher, please Google them. Soon we'll have a much more definite plan for running and testing our code.)
Next post: Python task manager from scratch, part 3: Separating the data