-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathtodo.py
More file actions
44 lines (35 loc) · 1.21 KB
/
todo.py
File metadata and controls
44 lines (35 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# todo_app.py
"""
A simple To-Do List app skeleton using Tkinter.
Google Calendar API integration will be added later.
"""
from logging import root
import tkinter as tk
def main():
root = tk.Tk()
root.title("To-Do List")
root.geometry("400x400")
label = tk.Label(root, text="To-Do List App Skeleton")
label.pack(pady=20)
root.mainloop()
if __name__ == "__main__":
main()
tasks = []
def add_task(task):
tasks.append(task)
print(f"Task added: {task}")
def remove_task(task):
if task in tasks:
tasks.remove(task)
print(f"Task removed: {task}")
else:
print(f"Task not found: {task}")
print("Remove task function")
add_button = tk.Button(root, text="Add Task", command=lambda: add_task("Sample Task"))
add_button.pack(pady=10)
remove_button = tk.Button(root, text="Remove Task", command=lambda: remove_task("Sample Task"))
remove_button.pack(pady=10)
print("Add task function")
def sync_with_google_calendar():
# Placeholder function for Google Calendar API integration
print("Syncing with Google Calendar (placeholder)")