import tkinter as tk
from tkinter import *
from tkinter import ttk
from tkinter.filedialog import askopenfilename
from src.classification import RFC
from src.classification.RFC import build_classification
def clear():
ud1.delete(0, tk.END)
ud2.delete(0, tk.END)
ud3.delete(0, tk.END)
f1.delete(0, tk.END)
f2.delete(0, tk.END)
r1.delete(0, tk.END)
r2.delete(0, tk.END)
d1.delete(0, tk.END)
d2.delete(0, tk.END)
a1.delete(0, tk.END)
a2.delete(0, tk.END)
p1.delete(0, tk.END)
p1.delete(0, tk.END)
n1.delete(0, tk.END)
n2.delete(0, tk.END)
kdpr1.delete(0, tk.END)
kdpr2.delete(0, tk.END)
gkmp1.delete(0, tk.END)
gkmp2.delete(0, tk.END)
window = Tk()
window.title("Прогнозирование доминанты")
window.geometry("1024x798")
editor = Text()
entry = ttk.Entry()
editor.pack(fill=BOTH, expand=1)
editor.insert("1.0", "Удельный вес")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
ud1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
ud2 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
ud3 = entry.get()
#return ud1, ud2, ud3
editor.insert("2.0", "Семья")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
f1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
f2 = entry.get()
#return f1, f2
editor.insert("3.0", "Ранг")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
r1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
r2 = entry.get()
#return r1, r2
editor.insert("4.0", "Доля")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
d1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
d2 = entry.get()
#return d1, d2
editor.insert("5.0", "Актив")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
a1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
a2 = entry.get()
#return a1, a2
editor.insert("6.0", "Пассив")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
p1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
p2 = entry.get()
#return p1, p2
editor.insert("7.0", "Число")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
n1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
n2 = entry.get()
#return n1, n2
editor.insert("8.0", "КДРП")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
kdpr1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
kdpr2 = entry.get()
#return kdpr1, kdpr2
editor.insert("9.0", "ЖКМП")
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
gkmp1 = entry.get()
ttk.Entry().pack(anchor=NW, padx=8, pady= 8)
gkmp2 = entry.get()
btn1 = ttk.Button(text="Свернуть", command=window.withdraw())
btn1.pack(anchor=NE, padx=8, pady= 8)
btn2 = ttk.Button(text="Закрыть", command=window.destroy())
btn2.pack(anchor=NE, padx=8, pady= 8)
file = askopenfilename()
btn5 = ttk.Button(text="ExL", command=askopenfilename())
btn5.pack(anchor=S, padx=8, pady= 8)
btn3 = ttk.Button(text="Определить", command=build_classification(file, ud1, ud2, f1, f2, r1, r2, d1, d2, a1, a2, p1, p2, n1, n2, kdpr1, kdpr2, gkmp1, gkmp2))
btn3.pack(anchor=SW, padx=8, pady= 8)
btn4 = ttk.Button(text="Очистить", command=clear)
btn4.pack(anchor=SE, padx=8, pady= 8)
editor.insert("1.0", "Доминанта")
ttk.Entry().pack(anchor=SE, padx=8, pady= 8)
entry.insert(resc)
editor.insert("2.0", "Вероятность классификации")
entry.insert(resp)
ttk.Entry().pack(anchor=SE, padx=8, pady= 8)
window.mainloop()
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
Вопрос задан
более года назад
93 просмотра