-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
43 lines (33 loc) · 1.03 KB
/
main.py
File metadata and controls
43 lines (33 loc) · 1.03 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
import os
from inquirer2 import prompt
import common
from code_generator.generator import Generator
from data_manager.data_manager import DataManager
def main():
while True:
if common.TRANSFER_TO_GENERATOR:
Generator.start_app(True)
os.system('cls' if os.name in ('nt', 'dos') else 'clear')
questions = [
{
'type': 'list',
'name': 'menu_choice',
'message': 'Select tool to use:',
'choices': [
'Code Generator',
'Data Manager',
'Quit',
],
},
]
answers = prompt.prompt(questions)
choice = answers['menu_choice']
if choice == 'Code Generator':
Generator.start_app()
elif choice == 'Data Manager':
DataManager.start_app()
elif choice == 'Quit':
os.system('cls' if os.name in ('nt', 'dos') else 'clear')
break
if __name__ == '__main__':
main()