import final from Tkinter import * from tkMessageBox import showinfo import shelve shelvename = 'Fresher Data' fieldnames = ('Name', 'Gender', '12th%', '12th Board') def makeWidgets(): global entries window = Tk() window.title('Student Input Attribute') form = Frame(window) form.pack() entries = {} for (ix, label) in enumerate(fieldnames): lab = Label(form, text=label) ent = Entry(form) lab.grid(row=ix, column=0) ent.grid(row=ix, column=1) entries[label] = ent Button(window, text="Predict",command=show).pack(side=LEFT) #Button(window, text="Update").pack(side=LEFT) Button(window, text="Quit",command=window.quit).pack(side=RIGHT) return window def show(): dics = {} for field in fieldnames: dics[field] = entries[field].get() #print field, entries[field].get() student = final.fresher() student.SB = dics["12th Board"] student.M12 = dics["12th%"] student.gender = dics["Gender"] student.select_dept()# This function takes an input , which i want to happen in another pop up window. window = makeWidgets() window.mainloop()
how do i include another window or frame to get values from the student.select_dept() # from import final
I'm not sure about how to make new window or frame to do the desired task in a single program.
No comments:
Post a Comment