I am creating a login form in which the user enters their customer ID and forename to login. I need to use the customer ID that is entered in this form in another file. Here is my code for the first file (the login form)
def customer_login():
global CustomerID, Forename
master = Tk()
Label(master, text="Customer Login", fg='black', bg='turquoise', font=('comicsans', 14)).grid(row=0)
Label(master, text="Please enter your Customer ID", fg='black', bg='turquoise', font=('comicsans', 12)).grid(row=1)
Label(master, text="Please enter your forename", fg='black', bg='turquoise', font=('comicsans', 12)).grid(row=2)
CustomerID = Entry(master)
Forename = Entry(master)
CustomerID.grid(row=1, column=1)
Forename.grid(row=2, column=1)
CustomerIDSave=CustomerID.get()
I then need to use the CustomerIDSave
variable in another. I tried to import the file as a module but this didn't work. Any ideas on what I could do? I can't have the program all in one large file, as it would be far too big.