-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()
谢谢你它真的帮助 –