I have a program that does automation by logging to the devices using netmiko library. Tkinter is the front end to provide details like Device getting connected to Username and password. If I keep all the things in a single program it works.
Now I want tkinter GUI program to call program separately using import function. By doing so I want to pass values retried from GUI frontend to backend program to do some function. Where I got stuck is some values that need to pass are inside the backend function collected from frontend GUI.
Seems after import the program its not working, any help would be appreciated.
e1 e2 and e3 values are not passing under show_entry_details function created in separate python file which i imported.
''' the code is regarding tkinter application which works at the front end to prompt user for some info, which later passes to other program to call some function.'''
# Head of Tkinter application
master = Tk()
master.title("Network Automation")
# configuration for the labels and entry
Label(master, text="Device : ").grid(row=0)
Label(master, text="User ID : ").grid(row=1)
Label(master, text="Password : ").grid(row=2)
e1 = Entry(master)
e2 = Entry(master)
e3 = Entry(master, show='*')
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
e3.grid(row=2, column=1, )
# configuration for the button
Button(master, text='Quit', command=master.destroy).grid(row=4, column=0, sticky=W, pady=4)
Button(master, text='Harden', command=show_entry_fields).grid(row=4, column=1, sticky=W, pady=4)
mainloop()