A To Do List in Python is a piece of software that keeps track of forthcoming chores or events. Users require simple software that can be used quickly to take notes. That is when the to-do list comes in handy.
To-Do Lists are a list of your daily tasks that you carry with you to remind yourself of what you need to get done that day.
The To Do List Project in Python is a basic desktop project system written in Python. It is designed with tkinter and the project file comprises (todolist.py).
Moreover, this Python To Do List Project is the easiest approach for novices or college students to get started. If you want to see more recent projects, click here. We offer a collection of free to download Best Python Projects with Source Code.
Python is simple to learn as a beginning, and you won’t need to download as many dependencies separately. Python includes the TKinter toolkit, which expands the number of graphical user interface packages.
This is an open-source article that anybody can download and alter according to their needs.
Project Details and Technology: To Do List with Python
Project Name: | To Do List Project in Python |
Abstract: | To Do List in Python a list of your daily tasks that you keep on your person to remind yourself of the tasks you have to accomplish that day. |
Language/s Used: | Python (GUI Based) |
Python version (Recommended): | 3.8 or 3.9 |
Type: | Desktop Application |
Developer: | Source Code Hero |
Updates: | 0 |
How To Do A List In Python?
Here’s the source codes on how To Do A List In Python.
Import Libraries
First, Import all the required libraries for our to do list app.
import tkinter
import threading
from tkinter import messagebox
import sys
5 Modules of To Do List
To Do List In Python Has 5 Modules:
- getting_tasks
- adding_record
- updating_record
- proceed_time
- actual_time
getting_tasks:
def getting_tasks(event=""):
work = todo.get()
hour = int(time.get())
todo.delete(0, tkinter.END)
time.delete(0, tkinter.END)
todo.focus_set()
adding_record(work, hour)
if 0 < hour < 999:
updating_record()
adding_record:
def adding_record(work, hrs):
tasks.append([work, hrs])
clock = threading.Timer(hrs, proceed_time, [work])
clock.start()
updating_record:
def updating_record():
if WorkingList.size() > 0:
WorkingList.delete(0, "end")
for task in tasks:
WorkingList.insert("end", "" + task[0] + "=======>>> Time left: " + str(task[1]) + " Seconds")
proceed_time:
def proceed_time(task):
tkinter.messagebox.showinfo("Notification", "Its Now the Time for : " + task)
actual_time:
def actual_time():
if ok_thread:
real_timer = threading.Timer(1.0, actual_time)
real_timer.start()
for task in tasks:
if task[1] == 0:
tasks.remove(task)
task[1] -= 1
updating_record()
Complete Source Code
import tkinter
import threading
from tkinter import messagebox
import sys
tasks = []
timer = threading
real_timer = threading
ok_thread = True
def getting_tasks(event=""):
work = todo.get()
hour = int(time.get())
todo.delete(0, tkinter.END)
time.delete(0, tkinter.END)
todo.focus_set()
adding_record(work, hour)
if 0 < hour < 999:
updating_record()
def adding_record(work, hrs):
tasks.append([work, hrs])
clock = threading.Timer(hrs, proceed_time, [work])
clock.start()
def updating_record():
if WorkingList.size() > 0:
WorkingList.delete(0, "end")
for task in tasks:
WorkingList.insert("end", "" + task[0] + "=======>>> Time left: " + str(task[1]) + " Seconds")
def proceed_time(task):
tkinter.messagebox.showinfo("Notification", "Its Now the Time for : " + task)
def actual_time():
if ok_thread:
real_timer = threading.Timer(1.0, actual_time)
real_timer.start()
for task in tasks:
if task[1] == 0:
tasks.remove(task)
task[1] -= 1
updating_record()
if __name__ == '__main__':
# application
root = tkinter.Tk()
root.geometry("460x480")
root.title("Students to do List Reminder")
root.rowconfigure(0, weight=1)
root.config(bg="blue")
# fenetre
frame = tkinter.Frame(root)
frame.pack()
# widgets
lbl = tkinter.Label(root, text="Enter Tasks To Do:", fg="white", bg="blue",
font=('Arial', 14), wraplength=200)
lbl_hrs = tkinter.Label(root, text="Enter time (Seconds)", fg="white",
bg="blue", font=('Arial', 14), wraplength=200)
todo = tkinter.Entry(root, width=30, font=('Arial', 14))
time = tkinter.Entry(root, width=15, font=('Arial', 14))
post = tkinter.Button(root, text='Add task', fg="white", bg='green',
font=('Arial', 16), relief="ridge", bd=5, height=3,
width=30, command=getting_tasks)
Exit = tkinter.Button(root, text='Exit', fg="white", bg='red', height=3,
font=('Arial Bold', 14), relief="ridge", bd=5, width=30, command=root.destroy)
WorkingList = tkinter.Listbox(root, font=('Arial', 12
))
if tasks != "":
actual_time()
# binding
root.bind('<Return>', getting_tasks)
# widgets placement
lbl.place(x=0, y=10, width=200, height=25)
lbl_hrs.place(x=235, y=10, width=200, height=25)
todo.place(x=20, y=40, width=160, height=25)
time.place(x=245, y=40, width=170, height=25)
post.place(x=62, y=80, width=100, height=25)
Exit.place(x=302, y=80, width=50, height=25)
WorkingList.place(x=20, y=120, width=395, height=300)
root.mainloop()
ok_thread = False
sys.exit("FINISHED")
This To Do List App Python also includes a downloadable Project With Source Code for free, just find the downloadable source code below and click to start downloading.
By the way, if you are new to python programming and you don’t have any idea what Python IDE to use, I have here a list of Best Python IDE for Windows, Linux, Mac OS for you.
Additionally, I also have here How to Download and Install Latest Version of Python on Windows.
To start executing a To Do List in Python with Source Code, make sure that you have installed Python on your computer.
Steps on how to run To Do List in Python With Source Code
Time needed: 5 minutes
These are the steps on how to run To Do List in Python With Source Code
- Step 1: Download Source Code
First, find the downloadable source code below and click to start downloading the source code file.
- Step 2: Extract File
Next, after finished to download the file, go to file location and right click the file and click extract.
- Step 3: Open Project Path and Open CMD (Command Prompt).
Next, In order for you to run the project, you just need to open the project path and type CMD. The first thing you need to do is type py todolist.py in the command prompt. After that, just wait for a few seconds to load the system.
Download the Source Code below!
Summary
This To Do List Project in Python is designed using tkinter and the project file contains(todolist.py).
This project is good for the student who wants to learn Python programming because this project contains a Graphical User Interface (GUI) and a users friendly.
It is easy to understand and manipulate this project and use it for education purposes only.
Related Articles
Inquiries
If you have any questions or suggestions about the To Do List in Python with Source Code, please feel free to leave a comment below.