Shown below is the code for a tkinter login window, I'm trying to get a logo to display at the top of the screen, but get this error when doing so:
NameError: global name 'tkinter' is not defined
Here is my full code:
*original code was here
Thanks
CODE AFTER EDIT (Removing tkinter.):
from tkinter import *
root = Tk()
root.title("Speed Wars Login")
def createInterface():
Label(root, text="Log in").grid(row=1, column=0)
Label(root, text="Create Account").grid(row=1, column=3)
#PLACE IMAGE
canvas = Canvas(root)
canvas.grid(row=0, column=2)
photo = PhotoImage(file = "logo.gif")
canvas.create_image(0, 0, image=photo)
Label(root, text="Username").grid(row=2, column=0)
Label(root, text="Password").grid(row=3, column=0)
global usrnm
global psswrd
usrnm = Entry(root, width = 15)
psswrd = Entry(root, show="*", width = 15)
usrnm.grid(row=2, column=1)
psswrd.grid(row=3, column=1)
def loginprint():
print("Username: %s\nPassword: %s" % (usrnm.get(), psswrd.get()))
createInterface()
Button(root, text="Login", command = loginprint).grid(row=3, column=0)
root.mainloop()