-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathretrieve.py
More file actions
44 lines (40 loc) · 1.31 KB
/
retrieve.py
File metadata and controls
44 lines (40 loc) · 1.31 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
import subprocess as sp
import colours
from selection import selection
from projection import projection
from aggregate import aggregate
from search import search
from analysis import analysis
def retrieve():
while(1):
tmp = sp.call('clear', shell = True)
print("Choose an operation:")
print(f"{colours.bcolors.OKCYAN}")
print("1. Selection")
print("2. Projection")
print("3. Aggregate")
print("4. Search")
print("5. Analysis")
print(f"{colours.bcolors.ENDC}{colours.bcolors.WARNING}")
print("6. Back")
print("7. Exit")
print(f"{colours.bcolors.ENDC}")
ch = input("Enter choice: ").lower()
tmp = sp.call('clear', shell=True)
if ch == '1' or ch == 'selection':
selection()
elif ch == '2' or ch == 'projection':
projection()
elif ch == '3' or ch == 'aggregate':
aggregate()
elif ch == '4' or ch == 'search':
search()
elif ch == '5' or ch == 'analysis':
analysis()
elif ch == '6' or ch == 'back':
return
elif ch == '7' or ch == 'exit':
exit()
else:
print(f"{colours.bcolors.RED}Invalid Option{colours.bcolors.ENDC}")
input("Enter any key to continue: ")