This repository was archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
62 lines (56 loc) · 2.35 KB
/
main.py
File metadata and controls
62 lines (56 loc) · 2.35 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
# Last edit date : 2019.09.15
# This project's github site : https://github.com/gunwoo7/lexical_learning_program
# Please read "README.md" first before using the source code.
# "README.md" file contains instructions for using this program.
# Compile this code file to run the whole program.
# Compile each code file to run the file.
import time
import GUI_management as gui
def finished_program(): # Print lexical level ending sign
if gui.selected_level == 1:
print("End of elementary 5 lexical level.")
elif gui.selected_level == 2:
print("End of elementary 6 lexical level.")
elif gui.selected_level == 3:
print("End of middle 1 lexical level.")
elif gui.selected_level == 4:
print("End of middle 2 lexical level.")
elif gui.selected_level == 5:
print("End of middle 3 lexical level.")
else:
print("End of TEST lexical level.")
print("Exit the lexical_learning_program.")
time.sleep(5) # User need check!
def Error(): # error processing
for i in range(100):
print("lexical_learning_program detect the error! Exit automatically in 6 seconds")
time.sleep(0.01)
for i in range(4):
print("lexical_learning_program detect the error! Exit automatically in 5 seconds")
time.sleep(0.25)
for i in range(100):
print("lexical_learning_program detect the error! Exit automatically in 4 seconds")
time.sleep(0.01)
for i in range(4):
print("lexical_learning_program detect the error! Exit automatically in 3 seconds")
time.sleep(0.25)
for i in range(100):
print("lexical_learning_program detect the error! Exit automatically in 2 seconds")
time.sleep(0.01)
for i in range(100):
print("Exit the lexical_learning_program.")
time.sleep(0.01)
exit(-1)
def main():
try: # Error processing
print("Starting the lexical_learning_program!")
print("Do not exit this tab if you want to use the program!")
print("To exit the program, use the Exit button to save the data.")
print("Exiting this tab will close the program and no program data will be saved.")
gui.Control_First_Second_GUI() # First Second Page
gui.Control_Third_GUI() # Third Page
finished_program() # Print lexical level ending sign
exit(0)
except Exception:
Error()
main()