-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
63 lines (54 loc) · 1.26 KB
/
Copy pathmain.py
File metadata and controls
63 lines (54 loc) · 1.26 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from time import sleep # pylint: disable=unused-import
import database
from database import clearConsole
def method_continue():
print(
"""
----------------------------------------------------------------
Continue?
----------------------------------------------------------------
Yes: 1
No: 0
----------------------------------------------------------------
"""
)
sel_num = input("Number?: ")
clearConsole()
if sel_num == "1":
main()
else:
exit()
def main():
print(
"""
----------------------------------------------------------------
CRUD MENU
----------------------------------------------------------------
Create: 1
Read: 2
Update: 3
Delete: 4
Exit: 5
----------------------------------------------------------------
"""
)
sel_menu_num = input("Number?: ")
clearConsole()
if sel_menu_num == "1":
database.create()
method_continue()
elif sel_menu_num == "2":
database.read()
method_continue()
elif sel_menu_num == "3":
database.update()
method_continue()
elif sel_menu_num == "4":
database.delete()
method_continue()
elif sel_menu_num == "5":
exit()
else:
main()
if __name__ == "__main__":
main()