from tkinter import * root = Tk() root.geometry('300x300') root.title('Discord bot GUI') root.iconbitmap(r'gear.ico') # **** FUNCTIONS **** def save_input(): firstName_info = firstName.get() lastName_info = lastName.get() print (firstName_info, lastName_info) file = open ('user.txt', "a") file.write ("First name :", firstName_info) file.write ("Last name :", lastName_info) file.close() print ('User', firstName_info, 'has been registered succesfully') # **** APPEARANCE **** def doNothing(): print("ok ok I won't...") toolbar = Frame(root, bg="black") insertButt = Button(toolbar, text="Kick...", command=doNothing) insertButt.pack(side=LEFT, padx=2, pady=2) printButt = Button(toolbar, text="Ban...", command=doNothing) printButt.pack(side=LEFT, padx=2, pady=2) toolbar.pack(side=TOP, fill=X) status = Label(root, text='ServiceCord™', bg='black', fg='white', bd=1, relief=SUNKEN, anchor=W) status.pack(side=BOTTOM, fill=X) # entrys firstName_text = Label (text='First name *' ) lastName_text = Label (text = 'Last name *') age_text = Label (text= 'Age *') firstName_text.place(x=15 , y=40) lastName_text.place(x=15, y=90) firstName =StringVar() lastName =StringVar() firstName_entry = Entry (textvariable = firstName, width = '30') lastName_entry = Entry (textvariable= lastName, width ='30') firstName_entry.place (x=15, y=60) lastName_entry.place (x=15, y=110) submit = Button (text='submit', width='7', height='2', command= save_input, bg = 'grey') submit.place(x=15, y=150)