6-1: Intro to Tkinter

preview_player
Показать описание
In this video I introduce you to GUI (Graphiical User Interface) programming in Python. The tinter module makes GUI programming practical and fun.

Рекомендации по теме
Комментарии
Автор

This was a GREAT introduction to Tkinter. Thanks so much! Really clear and really well done. 

MindyMcAdams
Автор

This is so cool! I am in university right now and i just finished my programming course! We learn't python right up till recursion, and did some GraphWin graphics stuff. I found that pretty interesting and now i would like to learn more about tkinter! Thanks for this introduction video

VDEngineering
Автор

Hi Kent, thanks for the tutorial. You gave the call name if__name__"==__main": Is that the rule to name with 2 underscore or could you have done it with just one underscore _ ?

Africanmovie
Автор

Hi Dr. Lee, I was programming along with you splendidly, then I imported a new version of wing's IDE.  Problems a'plenty.  What version of Python were you using in 6.1. and do you use the bash line ? 

MUSESQ
Автор

I have been going through python lately but i'm having a hard time with documentation. Where do you get all the methods and commands like t.getscreen() and stuff like that? Where do you find the list of commands with descriptions? I like wiki style documentation if there are several versions.

MacMiggity
Автор

Testing at the same time you do and got to where you tested the quit button, the button appears and when I click the message appears on screen but the window does not close.

# quit btn
    def quitHandler():
        print("Goodbye")
        sys.exit(0)

Any suggestrions?  I am using Python IDLE 3.4.1.

Thanks

dashbyictfd
Автор

Muito bom. Obrigado por compartilhar. Se possível faça mais vídeos!!!

ledsonvanini
Автор

The statement is

if __name__ == "__main__":
main()

There is a space between if and __name__. The __name__ variable is created by Python and set to the value "__main__" if the module being executed is the main module. If the module was imported into another module, then __name__ would not be set to "__main__". This mechanism is in place so that each module can have its own main function (for testing purposes) and only the main function from the main module will be executed.

CSProfessor
Автор

Basically around 13:20 you touch on this. Can you elaborate on effective documentation usage? Sorry if this sounds odd, it's just what i'm hanging up on.

MacMiggity
Автор

Thanks so much for the tutorial. You do a fantastic job introducing concepts to us newbies!

One thing I'm struggling with is in regards to the quitHandler function.. i'm using Python 2.7 on a Mac. When I click on the quit button in my frame, the root window does not close, and I get the infamous spinning color wheel. However, I do see the "Goodbye!" text in my interpreter. Any thoughts as to why that may be happening? I am using sys.exit(0) like you suggested

stevieray
Автор

Sir wanted to take this opportunity to say Thank you for such a nice Tutorial it was really Helpful. Keep on doing the Good work and you will get your reward. Thanks once more #thumbsup  

evidencekhosa
Автор

Okay, your tutorial is for python 3.4
There is another turtorial done that works with 2.7. Running the first bit of code you made in 2.7 didn't work on mine.

keithlarsen
Автор

This video really helped me, mostly because I didn't know how to lay out my program. I didn't realise you could put functions within the main function and I got stuck trying to figure out how to access textboxes etc from the functions my buttons were calling.

How come when I make a multiline text box I have to pack on a separate line?
o = Text(tk).pack() #doesnt work, o stays empty

o = Text(tk)
o.pack()
o.insert("1.0", "hello world") #now I can insert text?!

Aeropher
Автор

When I click on the red bug in WingIDE it opens the turtle.py module and take me to the line:
"from tkinter import simpledialog"
What am I doing wrong here? ;-(

victorwestmann
Автор

hi sir, how r u ? which book u follow ?

nishantjain
Автор

For some reason sys.exit(0) did not work I had to import os and use os._exit(1) instead

nickguendel
Автор

screen.onclick(dragHandler) is working, but t.ondrag(dragHandler) isn't working... Help?

MarkovPetar
Автор

Text(tk).pack() actually packs Text(tk), it is a void method that not returns anything
Hence if you assign it to o, o will stays with NoneType (or say null, or say nothing)

o=Text(tk) actually assigned Text(tk) to o,
then o.pack() actually equals to Text(tk).pack()

Alibeitai
Автор

Can one make a professional application with tkinter? if one can not, what is the purpose of putting up this tutorial and what is the benefit of learning tkinter? I wish i'm not wasting my time learning it.

gloriouswingsresearch
Автор

As a noob, I tried diving in head 1st, to see how Python is used to build GUI's this talk really scared me, i assume I just don't have the prerequisites to follow such a talk.
Why do python developers use such feature less IDE's? There doesn't seem to be any intellisense & why can't I simply draw the "window" with associated buttons, drop down menus..etc that I want to create and have the code generated by the IDE, am I missing something?

I read every where why Python is awesome...huh?

veganath