-1
我必須用python語言編寫一個程序,該程序實現了三種不同的算法,用於使用GUI進行凸包計算,以選擇包含數據的文件並顯示彙總結果。GUI python文件導入
我使用tkniter的GUI,我有問題從PC導入數據文件並將數據保存在列表中。 這是我的代碼
def OpenFile():
filename = filedialog.askopenfilename()
lines = filename.readlines()
filename.close()
root = Tk()
root.title('convex hull')
root.geometry('400x300')
label1 = ttk.Label(root,text="Enter points").place(x=20,y=3)
label2 = ttk.Label(root,text = "Choose One of the algorithm to sort the points").place(x=0,y=60)
btn1= ttk.Button(root,text="Browse", command = OpenFile)
btn1.pack()
謝謝你它真的幫助 –