[Tutor] import tkinter as tk
At the Python command prompt, I write: import tkinter as tk top = Tk() Traceback (most recent call last): File ââ, line 1, in module NameError: name âTkâ is not defined I see under my Python36 directories for both the Lib and libs directories both of which have a directory or file referencing tkinter. Why is a blank window not loaded? Sent from my iPhone ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] import tkinter as tk
On 03/04/18 02:15, Rex via Tutor wrote: > At the Python command prompt, I write: > > import tkinter as tk > top = Tk() You forgot the module prefix. top = tk.Tk() -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor