From the course: Python GUI Development with Tkinter

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Saying hello to Tkinter

Saying hello to Tkinter

From the course: Python GUI Development with Tkinter

Start my 1-month free trial

Saying hello to Tkinter

- [Instructor] Now that we verified that Tcl/Tk and the Tk intermodule are installed and working correctly on our machine, let's run our first Python program with a simple GUI window. And in sticking with programming tradition, let's say hello to Tkinter. If you navigate to the exercise files, and go into the chapter one directory, you'll find a file called hello_tkinter. I'm going to right-click on that file, and choose to open it with IDLE. Here you can see that it's a simple program with just four lines of code. I'll briefly describe what each line does, but don't worry about understanding the specifics for now. We'll cover each of those in plenty of detail later. The first line imports all of the functions and variables from the Tkinter package. Notice that Tkinter is spelled out using all lower-case letters. I'm mentioning this because it's one of the minor difference you'll need to consider if you're using Python 2. In Python 2, Tkinter is spelled with a capital T, whereas in…

Contents