Welcome to the To-Do List (Command-Line) page.
This page contains a brief description and implementation instructions for the project.
Project Description
A command-line application to manage a task list. Users can add, view, and delete tasks. The tasks are stored (e.g. in a text file), so they persist between runs. This helps students practice file I/O and command-line interfaces. (GfG example: “Todo list is a basic app in which users can add items… helps you stay organized”.)
Project Requirements
Python 3.x (no external libraries; built-in modules like sys
or os
for advanced features).
How to Run the Project
- Create a script (e.g.
todo.py
) to read/write a tasks file (todo.txt
) and parse command-line arguments or menu options. - In the terminal, run
python todo.py
. The app can prompt with options like “add task”, “list tasks”, “remove task”, etc. - Follow the on-screen prompts to manage tasks. The tasks file will be updated accordingly.
Key Concepts Learned
- File I/O: Reading from and writing to a text file to persist tasks.
- Command-line Arguments or Menus: Using
input()
orsys.argv
to accept user commands. - Data Structures: Using lists to manage tasks in memory.
- Control Flow:
if
/elif
branches to implement different commands (add, list, delete).
Possible Extensions
Add task priorities or due dates; implement a search or filter feature; mark tasks as completed; add error handling (e.g. deleting a nonexistent task); create a simple GUI (e.g. with Tkinter) instead of CLI.