-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask.py
More file actions
49 lines (40 loc) · 1.1 KB
/
Copy pathtask.py
File metadata and controls
49 lines (40 loc) · 1.1 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
45
46
47
48
49
from tkinter import *
from tkinter.ttk import *
import datetime
x = datetime.datetime.now()
print(x)
def show():
print("Show on")
root = Tk()
root.title("TaskCenter By Nate Brook")
file = open('task.txt', 'r')
string = file.read()
file.close()
label = Label(root, font=("ds-digital", 30), background="black", foreground="white")
label.pack(anchor="center")
label.config(text=string)
def add():
name = input('Task Name: ')
pwd = input("Body: ")
file = open('task.txt', 'a')
file.write(name + "|" + pwd + "\n")
file.close()
print("Task added")
def detele():
print("Task deteled")
file_detele = open('task.txt' , 'w')
file_detele.close()
while True:
mode = input(
"Would you like to add a new password or view existing ones (view, add, detele), press q to quit? ").lower()
if mode == "q":
break
if mode == "add":
add()
if mode == "view":
show()
elif mode == "detele":
detele()
else:
print("Invalid mode.")
continue