-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsgtest.py
More file actions
56 lines (45 loc) · 1.48 KB
/
sgtest.py
File metadata and controls
56 lines (45 loc) · 1.48 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
import PySimpleGUI as sg
import test
from funnyerror import funnyerror
# def oshibka_vvoda():
# layout = [[sg.Text('Некорректные данные!')],
# [sg.Button('Решить еще?'), sg.Button('Все.', bind_return_key = True)]]
# window = sg.Window('Ошибка', layout)
# event, values = window.Read()
# if event == 'Решить еще?':
# check = False
# window.close()
# elif event == 'Все.':
# check = True
# window.close()
# elif event is None:
# check = True
# window.close()
# else:
# funnyerror()
# return check
def main():
while True:
layout = [[sg.Text('Выберите метод решения СЛАУ',)],
[sg.Button('Гаусса'), sg.Button('Крамера'),
sg.Button('Матричный')]]
window = sg.Window('Решить СЛАУ').Layout(layout)
events, values = window.Read()
if events is None:
break
if events == 'Гаусса':
window.close()
check = test.Gauss_methodwithGUI()
elif events == 'Крамера':
window.close()
check = test.Kramer_methodwithGUI()
elif events == 'Матричный':
window.close()
check = test.Obr_matrixwithGUI()
else:
window.close()
break
if check:
break
if __name__ == '__main__':
main()