Python 2.7 Tutorial Pt 15 Tkinter GUI

Derek Banas · 136K views · 2010 · 9:46

Open on YouTube

Python, Ruby & scripting languagesEducation & learningtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a beginner Tkinter walkthrough, whether suggesting it for building a simple form or citing it as the tutorial they were following when they hit a problem.

Recommended by 1 people across 1 different months, 2013 to 2016.

What it is

A short 2010 tutorial by Derek Banas on building Python 2.7 GUI applications with the Tkinter module. It covers labels, buttons, radio buttons, checkboxes, accepting user input and wiring up event handlers to Python methods.

What people said

Recommends SubZero_566 · 2016-12 · Stack Overflow · on “Creating a login screen using MySQL connector and Python 2.7 Tkinter:”

You may create your login form as per the tutorial here [this video] For the submit button set a command that runs the function which connects to your MySQL server using the values entered in your text boxes and runs the queries. [LINK]

Cites BuroBernd · 2013-09 · Stack Overflow · on “python 2.7 - no module named tkinter”

i am on mac os x 10.8, using the integrated python 2.7. i try to learn about tkinter with tutorials like this [this video] for python 2.7 (explicitly not 3) they propose the following code: from tkinter import * import tkinter.messagebox however, this brings up the error: ImportError: No module named tkinter using import.Tkinter with a capital t seems to work, but further commands like import Tkinter.messagebox don't (neither does tkinter.messagebox). I've had this problem with lots of tutorials. what's the thing with the capital / non-capital "T", and how do i get my python to work like it does in the tutorials? Thanks in advance!

Cites user3725561 · 2014-07 · Stack Overflow · on “Python: Tkinter button function and urllib2”

Alright so I am following this [this video] tutorial on Python GUIs with Tkinter . My code is below and everything works fine. However this is not accurate since the program doesn't do what I actually need. In the GUIs box I want the user to be able to provide a link that will then be used from urllib2 to grab some links from the web and then open them via the drop-down menu of my GUI. So far, the link that the user is supposed to provide is hard-coded into the source and the button does pretty much nothing. So what I need here is to be able to connect the my button with response = urllib2.urlopen ? Any thoughs on that? Thanks a lot. import urllib2 from Tkinter import * #import tkinter.messagebox

Cites user4350786 · 2015-05 · Stack Overflow · on “Python GUI Constructor”

I'm new to Python, but not to programming. In this tutorial [LINK] , the author initializes a constructor in his class like so: class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) I understand it, and you do the same in C#, and Java. However, in this tutorial [this video] , why doesn't the author do the same? He only initializes the application. Like this: app = Tk() In what situation would I do the second over the first? Which in your opinion is better?