-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotesapp.py
87 lines (56 loc) · 1.29 KB
/
notesapp.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from datetime import datetime
import time
import os
username=os.getlogin()
#print(username)#prints the usersname(I need it for getting the path where a file can be stored.)
os.system('cmd /c "echo off"')
os.system('cmd /c "color B"')
global Subject
Subject=input("Subject: ")
path_documents="C:\\Users\\"+username+"\\Documents\\"+Subject+".txt"
path_desktop="C:\\Users\\"+username+"\\Desktop\\"+Subject+".txt"
#path_assigned_by_user=""+Subject+".txt"
file2 = open(path_documents,"a+")
start=0
k=0
def c1():
global Subject
#os.system('cmd /c "echo off"')
#os.system('cmd /c "color B"')
file2.write("\nDate: ")
file2.writelines(t)
file2.write("\n")
file2.writelines("subject: ")
file2.write(Subject)
file2.write("\n")
file2.write("Topic: ")
topic=input("Topic: ")
file2.write(topic)
file2.write("\n")
file2.write("Note: ")
c2()
def c2():
global k
k=k+1
c=str(k)
note=input("Note : ")
file2.write(note)
file2.write("\n")
while True:
now = datetime.now()
date_time = now.strftime("%m/%d/%Y")
ch=now.strftime("%M")
t=date_time
start
#print(ch)
if ch=='0' or ch=='00' or ch==0 :
c1()
elif(start==0):
c1()
start=1
else:
c2()
#hange file access modes
file2.close()
'''
'''