Tkinter Course - Create Graphic User Interfaces in Python Tutorial

  Рет қаралды 3,389,510

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Пікірлер: 2 600
@muhammadshafeeq5334
@muhammadshafeeq5334 4 жыл бұрын
Can we take a minute to respect this man who did a lotta work and gave it all with no ads
@infrakazos
@infrakazos 3 жыл бұрын
Nah man 10 minutes to respect
@luigiluis3d482
@luigiluis3d482 3 жыл бұрын
How about the 5 hour duration of the video, and not just respect, but appreciation as well?
@atyoursix
@atyoursix 3 жыл бұрын
@@luigiluis3d482 YES, i'm eating the whole content thoroughly.. the guy is so natural that it never gets boring
@aarushbharadwaj3509
@aarushbharadwaj3509 3 жыл бұрын
i gave 2 mins...lol
@HypnosisBear
@HypnosisBear 3 жыл бұрын
LoL it contains ads.
@marpy
@marpy 4 жыл бұрын
If anyone has trouble around 53:15, he's using a lowercase "L" when he types out "lambda" For whatever reason, his text editor changes the font, and it just looks like a capital L.
@yuvrajdwivedi8719
@yuvrajdwivedi8719 4 жыл бұрын
You're actually a legend.
@MrAkell0
@MrAkell0 4 жыл бұрын
Thanks Mark, you just spared me an afternoon of frustration. :o)
@Tyler_Dabs
@Tyler_Dabs 4 жыл бұрын
wow struggled for a few minutes on that one, thank you
@AryaDee72
@AryaDee72 4 жыл бұрын
for further clarification, his text editor italicizes the 'lambda' keyword, making the lowercase 'L' look uppercase.
@bogdanskout3326
@bogdanskout3326 4 жыл бұрын
Thanks pal
@EmmanuelGitgud
@EmmanuelGitgud 2 жыл бұрын
I like that there's no cut in the video when he makes small mistakes, because it shows you that even experienced programmers makes mistakes and they struggle sometimes too.
@hyperazzi
@hyperazzi Жыл бұрын
Best part of the video dadu
@tonyisnotdead
@tonyisnotdead Жыл бұрын
wow, experienced programmers are human beings? i always thought they were gods that physically couldn't make mistakes.
@letsbuildit7640
@letsbuildit7640 Жыл бұрын
actually noone is perfect
@DJ-ct6so
@DJ-ct6so Жыл бұрын
I think it's useful because if I ever happen to make the same mistake, there's a tutorial on how to fix it (if I can remember where to find it !!!)
@hashirtariq734
@hashirtariq734 Жыл бұрын
@@hyperazzi "dadu" 🤣🤣🤣🤣
@raghusharma4661
@raghusharma4661 2 жыл бұрын
Thank you Walter White for this course. From Chemistry to Coding, I appreciate your journey.
@ejelal
@ejelal 2 жыл бұрын
😂
@leochinchillaa
@leochinchillaa 2 жыл бұрын
JESSE WE NEED TO CODE
@AntekElektronik
@AntekElektronik 2 жыл бұрын
imagine breaking bad like that where a CS teacher teams up with his student to hack databases and then sell this pure information
@anaboliam
@anaboliam 2 жыл бұрын
I am the one who codes
@dotenks
@dotenks 2 жыл бұрын
@@AntekElektronik I wanna do that. :(
@uzoigwechidera6086
@uzoigwechidera6086 3 жыл бұрын
I don't normally do this, but am forced to come back and say "THANK YOU VERY VERY MUCH" you mixed happiness with expertise, is so much fun watching your tutorials. I have subscribed already. A BIG THANK YOU ONCE MORE.
@arindambiswas-dev
@arindambiswas-dev 5 жыл бұрын
Best of luck for you journey 👍 ⌨️ (0:00:00) Intro to Tkinter ⌨️ (0:10:32) Positioning With Tkinter's Grid System ⌨️ (0:19:29) Creating Buttons ⌨️ (0:29:30) Creating Input Fields ⌨️ (0:38:51) Build A Simple Calculator App ⌨️ (1:18:19) Using Icons, Images, and Exit Buttons ⌨️ (1:27:42) Build an Image Viewer App ⌨️ (1:49:37) Adding A Status Bar ⌨️ (1:59:45) Adding Frames To Your Program ⌨️ (2:07:49) Radio Buttons ⌨️ (2:24:36) Message Boxes ⌨️ (2:35:31) Create New Windows in tKinter ⌨️ (2:44:30) Open Files Dialog Box ⌨️ (2:56:09) Sliders ⌨️ (3:08:25) Checkboxes ⌨️ (3:17:29) Dropdown Menus ⌨️ (3:23:50) Using Databases ⌨️ (3:32:28) Building Out The GUI for our Database App ⌨️ (3:59:48) Delete A Record From Our Database ⌨️ (4:15:18) Update A Record With SQLite ⌨️ (4:42:57) Build a Weather App ⌨️ (5:04:32) Change Colors In our Weather App ⌨️ (5:16:36) Add Zipcode Lookup Form ⌨️ (5:26:22) Matplotlib Charts Hope it was a great journey 😙👍🎉
@nahianlabiblimon5404
@nahianlabiblimon5404 5 жыл бұрын
This journey is already given in the description. Copy past and take credit is not sir
@dconnectzone
@dconnectzone 5 жыл бұрын
But still is cool. You can't click directly but here in comment section you can. Update: pew pew: Breaking News: we can now click.
@gambomaster
@gambomaster 5 жыл бұрын
@@nahianlabiblimon5404 Where did he take credit? 🙄
@nahianlabiblimon5404
@nahianlabiblimon5404 5 жыл бұрын
@@gambomaster you will not understand kid😄😎🤓
@labreynth
@labreynth 5 жыл бұрын
Jesus...is that you...?
@MiscellaneousDas
@MiscellaneousDas 5 жыл бұрын
Never knew that Walter White was a programmer rather than a chemistry teacher. Cool!!
@Codemycom
@Codemycom 5 жыл бұрын
Yeah, I get that a lot LOL
@kimrainman
@kimrainman 5 жыл бұрын
Lol
@Infernodia
@Infernodia 5 жыл бұрын
he's cooking up programs instead of meth.
@viennasovello4623
@viennasovello4623 5 жыл бұрын
@@Infernodia maybe both?
@karamkassem9821
@karamkassem9821 4 жыл бұрын
PRINT MY NAME!
@paultaylor7115
@paultaylor7115 4 жыл бұрын
if anyone was wondering at 2:57:25 why the from_ parameter needs an underscore at the end, it's because "from" by itself is a reserved word in Python (used in things like from Tkinter import messagebox, for example). Using a reserved word to have a completely different meaning would be problematic, so the developers of Tkinter added an underscore at the end to differentiate it from the original "from".
@DJ-ct6so
@DJ-ct6so Жыл бұрын
Many thanks Peter for the explanation. 👍
@brianfuller2241
@brianfuller2241 4 ай бұрын
If you want a good running start at Tkinter then this video is worth your time. Thank you John Elder for building and making your zillion other videos available for either no cost or beyond reasonable low cost.
@krakenzback7971
@krakenzback7971 2 жыл бұрын
This was the most amazing tutorial I have ever seen. I just started with Tkinter in 2022, and this was the second video I came across. Your personality and expertise is what kept me watching this whole time. Thank you for being an incredible teacher
@blokenearexeter
@blokenearexeter 4 жыл бұрын
its much better than the majority of courses online as you actually get to create something useful straightaway
@ericfernandes6741
@ericfernandes6741 3 жыл бұрын
This man is an absolute legend. People that come back 10 years after, know that this man is the G.O.A.T .
@ceciljoel9577
@ceciljoel9577 Жыл бұрын
not really i have seen myself that when people learn only one framework without any practice and deeper understand they will have a big problem implementing it in real life like learning python tkinter without knowing the deeper structure of programming language and all and then having confusion and intimidation with creating a real problem with it with sql / backened basically people can feel great by making calculator programs and great cheap praises from people who dont know this field but which will only make their skills at simple calculator level until they find it difficult too.
@KavyanshKhaitan
@KavyanshKhaitan 7 ай бұрын
@@ceciljoel9577 first you atleast gotta make something simple. You can use the same principal for the frontend (few buttons, inputs, dropdowns, etc.) and apply it to anything. For example, some command line tools, a multi-PC manager for a school, etc. I personally am trying to apply this into some software that our school lab requires but is not available online. So.. yeah. You can use that same calculator and repurpose it for something much-more significant. Another example: my grandfather has trouble using the command line for programs i made but really wants to use it as it would be helpful for his day-to-day task. I could implement a similar UI and apply it to 'em.
@cmputerprgrammer7800
@cmputerprgrammer7800 4 жыл бұрын
Happy teachers day to all my programming teachers! I could have never made such programs without you😀.
@ilikeyoursmile6215
@ilikeyoursmile6215 3 жыл бұрын
I like when he didn't cut the fail moments, I mean its pretty necessary to see what will happen if you did it wrong. This is the best tutorial I've ever seen.
@CXDRVC
@CXDRVC 2 жыл бұрын
giving a big salute to the man! no ads and straight natural but very good structured content. Even his courses are cheap as hell in comparison to other orgs. Appreciation and respect all your way!
@sa-hq8jk
@sa-hq8jk 3 жыл бұрын
It’s coding a website as a desktop app without using three different coding languages. Amazing.
@vin5718
@vin5718 4 жыл бұрын
Although he does a lot of those ineffective "fixing a clock by putting a clock over a clock" thing, he is still pretty clear in his teaching. I'm very appreciative of that. Yes, It's annoying to see something so simple become complicated, but for me it just leave a space for me to do better and applying skills I know to improve upon the projects.
@BigBrother4Life
@BigBrother4Life 2 жыл бұрын
Yeah he does repeat lots of code. Good for a beginner but not good for experience ones. Overall i'd still say 4.5/5
@pablorc8091
@pablorc8091 4 жыл бұрын
It's mind blowing that this is available to the public for free. Thank you very much
@siddharthbhatia8815
@siddharthbhatia8815 Жыл бұрын
I watched this entire video and wrote out every single line of code it had. It's taken me 2 weeks, but gosh I have learnt so much.
@flidoofficial1848
@flidoofficial1848 2 жыл бұрын
SUCH A GENIUS, YOURE LITERALLY TEACHING ME MY BIGGEST ASSIGNMENT THIS SEMESTER
@alialsinan7095
@alialsinan7095 4 жыл бұрын
thank you very much for this course. I love how even if you do a mistake you don't edit it out.
@Mr123fairlane
@Mr123fairlane 4 жыл бұрын
You tutorials are never boring that's why I am able to watch them to the end
@vortex_0558
@vortex_0558 3 жыл бұрын
I was trying to learn Tkinter since a long time, but unfortunately the resources which I found on Google were very confusing and incomprehensible. I was struggling to learn it for months, roaming around from one source to another. Then one day, I found your video which came as a shining star to my life. If you are seeing this Sir, I just wanna tell you that what I have learnt today is just priceless and all that was possible only because of you. Thanks a lot Sir, thanks a lot♥️♥️♥️ Lots of love, Aritra, From Kolkata, India
@souravkumardas7383
@souravkumardas7383 3 жыл бұрын
you are right,the most usefull video about tkinter on youtube till date
@mrmust2780
@mrmust2780 3 жыл бұрын
It is better u become a poet rather than a coder!
@jaylooppworld381
@jaylooppworld381 3 жыл бұрын
@@mrmust2780 ahahahaha
@raghusharma4661
@raghusharma4661 2 жыл бұрын
hey did u take notes while watching this tutorial?
@andreivaughn1468
@andreivaughn1468 2 жыл бұрын
Tkinter is not so bad... lots of documentation out there, and lots of example code to copy, try out, and experiment with. Essentially you need good problem-solving, and research skill, to get anywhere. I think what helped me is that back in school we spent a couple of weeks preparing for coding coursework and tkinter was something we covered way back then.
@gavinbaird1919
@gavinbaird1919 2 жыл бұрын
the education density of this video is off the charts... you are an incredible teacher.
@ShimmySnail
@ShimmySnail 2 жыл бұрын
As popular as Python is, there are not many courses on Python GUIs at all (or even books), and this is definitely the best one to start with. Thank you, Codemy!
@42svb58
@42svb58 4 жыл бұрын
start to finish! this will help immensely for my graduate program coming up! looking forward to subscribing to your website after my last week of business boot camp is done!
@myfailtube1
@myfailtube1 2 жыл бұрын
Been learning tkinter with this video now for about 3 weeks, just finished the radiobuttons. Absolutely great work, and I try my best to deeply understand every single bit of it! Thank you very much
@ajax1904
@ajax1904 4 жыл бұрын
Wow, I have been in here for 6 minutes, and I'm loving the way you explain. I am understanding everything perfectly
@Unknown10111
@Unknown10111 14 күн бұрын
Amazing. respect from 日本。万丈!!
@stevejuvesio4422
@stevejuvesio4422 3 жыл бұрын
this is the best tutorial ever... thank sir. i enjoyed the fact that you also used try and error. you weren't sure at some things. that made me feel the liveliness of the lessons thanks so much...
@Victor-tl4dk
@Victor-tl4dk 3 жыл бұрын
Yeah it can definitely be nice to be reminded that perfection does not exist.
@paultaylor7115
@paultaylor7115 4 жыл бұрын
note for around 1:02:04 when he decides to use a global variable: if you want to avoid using globals (and just make the whole calculator project a lot simpler), you could just have the calculator show the entire expression when you type it, instead of clearing the Entry field when one of the arithmetic operator buttons are pressed. This way, your program doesn't need to remember anything, and can just read what's in the Entry field when the equal button is pressed, and use eval(expresion_as_a_str) to evaluate the whole function easily. I'd also recommend making a function to create all the buttons so that you don't need to copy basically the same line a bunch of times only to change the value and placement of the button. Using partials (from functools import partial, then command=partial(myFunction, argument)) is also a helpful way to pass arguments to the button commands. With all this, the calculator project becomes a lot shorter to code and has all the same functionality. I wrote one that supports addition, subtraction, multiplication, division, exponentiation, decimals, and order of operations in 50 PEP 8-compliant lines haha, and I'm sure it could be done in fewer!
@-heal4ever-
@-heal4ever- 4 жыл бұрын
Thanks for the help, i was new into tkinter and knew the eval expression, it just made it so easy. Gonna research on the partials function and will try to learn.
@itamar2272
@itamar2272 3 жыл бұрын
can u show an example
@itamar2272
@itamar2272 3 жыл бұрын
I have a problem in the global could u help me?
@emilnavod67
@emilnavod67 2 жыл бұрын
Isn't the use of eval() considered a bad practice?
@anirudh2000
@anirudh2000 2 жыл бұрын
Or you could make a bunch of variables outside just for the purpose of storing temporary values. And instead of using global, change those outside variables according to your needs
@nowybopes
@nowybopes 4 жыл бұрын
3:40:02 if someone has a problem here with *"AttributeError: 'NoneType' object has no attribute 'delete'"* Don't do l_name = Entry(root, width=30).grid(row=1, column=1, padx=20) but l_name = Entry(root, width=30) l_name.grid(row=1, column=1, padx=20) it works then
@sakshirai8471
@sakshirai8471 4 жыл бұрын
thanks
@huzaifasuhail9770
@huzaifasuhail9770 3 жыл бұрын
Thanks, bro that was helpful
@RobinHagg
@RobinHagg 3 жыл бұрын
The reason this works with two lines is because Entry returns a object but grid does not.
@jaishreeram-o9b47
@jaishreeram-o9b47 3 жыл бұрын
did u got any indent error in submit function ?
@joevoc
@joevoc 2 жыл бұрын
I looked everywhere for this answer! I was wondering why my version didn't work but his did ! Thank You!
@deathbottle06
@deathbottle06 4 жыл бұрын
Hey everyone! At 3:15:19 you can type var.set("Off") or var.set("On"). Explenation: The checkbox does not set a default value by itself. When you make an IntVar(), the default value for an Integer (or number variable) is 0 which (to the checkbox) means false. So basically, you are giving the checkbox a default value, when you set the StringVar() to "Off". I hope this explenation was understandable. Have a good day!
@xzex2609
@xzex2609 2 жыл бұрын
this video is greate , and it's very adorable that he really shows actual development , that a developer make mistakes and instead of cutting the video , he gets through it and really thinks what he should do to resolve the problem , it's very adorable and self confidential.
@x0kosmus0x
@x0kosmus0x 3 жыл бұрын
I watched the first 2 hours because I never created gui apps in python before. This tutorial seems to be good if you want to get an overview of the different widgets, but I have a suggestion for anyone who is following along: try to reuse functions instead of copying code and defining functions that do basically the same as the copied one. E. g. the calculator has four different functions that are basically the same with a different string saved in a global variable. You could pass the string as a parameter like you did with the number function, then you would only need one. The image viewer also has redundant code. You could call the same funktion for forward and backward, just put both if statements in.
@aholder4471
@aholder4471 3 жыл бұрын
I'm new so forgive me if this is a dumb question, but do you mean to create a variable for each math operation, like add, subtract, multiply, divide and pass them through a function? So instead of having a line of code for each one, you can just define each one as a variable? I'm interested in this because my thought when I watched him build the image viewer is that the way he coded it was static, and I know it should be able to be done dynamically for lack of a better word. I know he did this to make it clearer and help teach the basic principles but I'm curious how you would call images without specifically referencing the specific image file. Can you call files without being specific like that? I'm sure it's possible somehow.
@x0kosmus0x
@x0kosmus0x 3 жыл бұрын
@Aaron Holder The more general function for all 4 operations could look like this def button_opt(opt) first_number = e.get() global f_num global math math = opt f_num = int(first_number) e.delete(0,END) And then you could call it like this button_add = Button(root, text="+", podx=39, pody=20, command=lambda button_opt("addition")) button_subtract = Button(root, text="-", podx=39, pody=20, command=lambda button_opt("subtraction")) button_multiply = Button(root, text="*", podx=39, pody=20, command=lambda button_opt("multiplication")) button_divide = Button(root, text="/", podx=39, pody=20, command=lambda button_opt("division")) the rest can stay the same and you save 21 lines of redundent code. For a dynamic image viewer you could use os.listdir to get all files in a directory. Then you could loop over this files to and create the image objects for your image list. The directory you check for images could come from user imput.
@gayathrigirishnair7405
@gayathrigirishnair7405 4 жыл бұрын
This was AWESOME! You have clearly and jovially explained the topics making it easily understandable all the while keeping the viewer engaged. Thank You.
@TheJacklwilliams
@TheJacklwilliams 3 жыл бұрын
Totally agree and I'm only a little bit into it. Some people are natural born teachers.
@RockRanchCowboy
@RockRanchCowboy 4 жыл бұрын
Taught myself how to create a data analysis program with GUI from this video. Thanks!
@kavinumasankar6544
@kavinumasankar6544 3 жыл бұрын
Just a tip: When creating the calculator, in the button_click function, you don't need three lines of code. The only line of code you need is e.insert(END, number). It works too.
@HoRRoRlets
@HoRRoRlets 3 жыл бұрын
noted, thank you
@patfacunla1687
@patfacunla1687 3 жыл бұрын
One of the best teacher I have ever seen here in YT!
@snoobab_86
@snoobab_86 3 жыл бұрын
What an awesome free course! Thank you so much for this. Took me a while to work through it. But its brilliant the way you broke it up into bite size snippets so that I can do it bit for bit as I find time. Finally finished this and I am really enjoying playing with Tkinter.
@EnglishRain
@EnglishRain 4 жыл бұрын
Notes for my future ref: 21:30 - control element shape by padx & pady 36:27 - give a textbox a description/faded text. 40:20 - how to give title to the window 57:30 - handling input in the calculator field, very confusing thing, good ref.
@justone4272
@justone4272 4 жыл бұрын
noice
@EnglishRain
@EnglishRain 4 жыл бұрын
@@justone4272 lol didn't realize others would find it useful as well.
@wotizit
@wotizit 4 жыл бұрын
@@EnglishRainthank you :))
@justone4272
@justone4272 4 жыл бұрын
@English Rain Surley did, thank you indeed.
@lucas.marianno
@lucas.marianno 4 жыл бұрын
Use height and width to control the shape instead of the padx and pady, it will be a hassle when you have a whole lot of things on screen with different texts on them. Just trust me, been there before.
@alexmakeslofi5174
@alexmakeslofi5174 4 жыл бұрын
THANK YOU SO MUCH for leaving timestamps in the description.
@rikkoo
@rikkoo 3 жыл бұрын
you have timestamps in the video lmao
@KillerBearsaw
@KillerBearsaw 3 жыл бұрын
Clicked this without looking at the video duration, looking to start finding resources and building my understanding of how to use Tkinter. Guess i don't need to keep looking. Wow!
@НұрсұлтанӘбішұлыНазарбаев-ь5и
@НұрсұлтанӘбішұлыНазарбаев-ь5и 9 ай бұрын
Whenever I am about to ask a question,you literally answer it within 5 seconds! You left no question marks in me! I loved this course it was unbelievably helpful.
@noelgomariz3038
@noelgomariz3038 3 жыл бұрын
for the image viewer app, there is a simpler way to make the buttons work: create a variable "i" that will keep track of which image is actually displayed, it will be obviously initialized to 0. Then, inside the next_image function declare the global variables "my_label" and "i". Each time you press the button_next, "i" will increase in 1 until it gets to the limit of the list, time when it will go to 0 and start again the count. The same for the previous_image function. Hope I made it clear enough. image_list = [ ] # list with your images n_imag = len(image_list) i = 0 my_label = Label(image=obama_list[i]) my_label.grid(row=0, column=0, columnspan=3) def next_image(): global my_label global i i = i+1 if i < n_imag-1 else 0 my_label.grid_forget() my_label = Label(image=image_list[i]) my_label.grid(row=0, column=0, columnspan=3) def previous_image(): global my_label global i i = i-1 if i >= 1 else 2 my_label.grid_forget() my_label = Label(image=image_list[i]) my_label.grid(row=0, column=0, columnspan=3) button_previous = Button(root, text='', command=next_image)
@chimdinduonyia3784
@chimdinduonyia3784 2 жыл бұрын
This was such a great tutorial on python GUIs. Happy I found this. I learnt overall, how to build GUIs, how to understand bugs and kind of correct them and as well, different programmatic approaches to creating solutions.
@ronnelmatthewrobles3947
@ronnelmatthewrobles3947 4 жыл бұрын
WHEW. Spending good time this quarantine learning how to code. Really had fun seeing the errors beforehand HAHA. Thanks for teaching us beginners!
@EnglishRain
@EnglishRain 4 жыл бұрын
I swear! It's a VERY good thing that he's running into errors so that noobs like me can figure out what to do if i run into the same error.
@unrevealablegaming2912
@unrevealablegaming2912 4 жыл бұрын
i am also learning in quarintine
@kimiscool4999
@kimiscool4999 4 жыл бұрын
i am also learning in quarantine
@MixMastaCopyCat
@MixMastaCopyCat 4 жыл бұрын
in praise of learning by henry cow
@sricharanathanti3181
@sricharanathanti3181 3 жыл бұрын
same here
@alexthekidmg
@alexthekidmg 4 жыл бұрын
This was so helpful! I love following along with you it really helped me understand what I was doing rather than just reading tutorials.
@william4786
@william4786 Жыл бұрын
I dont know normally comment but great video. Nice and clear step by step. Thank you. 🤩
@bobvance9519
@bobvance9519 9 ай бұрын
I haven't watched the whole tutorial yet, but I'm confident in saying that this is a real gem of a video.
@ioc9owo698
@ioc9owo698 3 жыл бұрын
3:14:53 it isn't a glitch. the variable is sat to Nothing and not "Off" or "On" so tkinter think its checked. You can solve it by typing : var.set("Off") or var.set("On")
@sricharanathanti3181
@sricharanathanti3181 3 жыл бұрын
If your planning to make a windows installation package for your tkinter app first convert your python package to a exe file to do that - pip install auto-py-to-exe after done to open the app - “auto-py-to-exe” in terminal or cmd. Launch the select your python file And convert it. Install inno setup compiler and then setup you windows installer
@jackblack_2001
@jackblack_2001 3 жыл бұрын
NO ADS. Clicks in Video, 10sec unskipable ad. "How many other lies i have been told by the council?"
@ravenssunglasses2660
@ravenssunglasses2660 3 жыл бұрын
On youtube there are 2 types of ads. Ads that support the creator and ads that support KZbin. The creator can disable ads but KZbin sometimes decides to put an ad that supports them. It is out of the creators control.
@jackblack_2001
@jackblack_2001 3 жыл бұрын
​@@ravenssunglasses2660 I kown XD, i just have used this to make someone who read this comment to laugh ;3 I really like the content on this channel, they have helped me learning new programming languages && frameworks! We all know google likes to put profit on everything :3
@bludhail
@bludhail 5 ай бұрын
@@ravenssunglasses2660 oh is that for real? thats evil
@trelta8149
@trelta8149 3 жыл бұрын
you made what i thought was a complex program into one made for children. thank you for making my learning journey easier!
@mossdem
@mossdem 3 жыл бұрын
For people who are struggling around 1:45:00 to get the '>>' or 'Next' button to enter a 'Disabled' state: He mentions it doesnt really matter where the if statement is placed. However, this is incorrect and probably just overlooked due to the recording happening etc. The if statement needs to be placed before the buttons as it will determine the state in which the buttons will be in. Once they are placed on the gui, the state can be changed but the button would have the removed and replaced. Similarly, we cannot place the if statement prior to us incrementing the image_number variable. The reason we cannot do this is because if we increment after the if statement is executed, then we will be able to use our button past our final point and encounter an error. At this point, the button is broken and will just keep producing errors in your terminal or console window. Ensure you place your if statement exactly where it is placed in the video to save yourself the pain of what I did and spent an extra 20 minutes on top of this 5 hour video trying to work it out haha! Hope this helps anyone who gets stuck where I did. Happy coding everyone :)
@Victor-tl4dk
@Victor-tl4dk 3 жыл бұрын
Thank you, took a screenshot of your comment for when I get there.
@mossdem
@mossdem 3 жыл бұрын
@@Victor-tl4dk No worries! I only really put this here just to clear any confusion as he does code it the correct way but says it doesn't matter where it goes when it does. Hope it helps if you do get stuck but feel free to ask me any questions if you need any help. More than happy to do what I can
@jesse7545
@jesse7545 3 жыл бұрын
Also for Mac users (I have never tried this on a Windows or Linux machine), to make the calculator buttons fill the space exactly like the one in the tutorial, you may need to set sticky='nsew' for each of the buttons if you use grid as he did (pack behaves differently where you can set expand to force widgets to fill the remaining space)
@aravindkumar4705
@aravindkumar4705 3 жыл бұрын
Bro, do we need to learn python first to understand tkinter?
@haydenhoodless2055
@haydenhoodless2055 4 жыл бұрын
For the calculator, instead of making a variable = e.get() then using insert(0,variable + number), all that was needed was to change the 0 to 1. insert(1, number). The 1 refers to where the inserted text goes.
@ayushmalik118
@ayushmalik118 2 жыл бұрын
Thank you so much for this tutorial! I had to create a basic GUI-based python executable and this tutorial was really useful to me!
@Hahahahaaahaahaa
@Hahahahaaahaahaa 2 жыл бұрын
This is such a great video, I'm just finding it years later and so grateful.
@hakangun9860
@hakangun9860 2 жыл бұрын
i m having so much fun with interactive courses like this
@tobichess2390
@tobichess2390 3 жыл бұрын
Thank you so much for this course!! Love the energy :)
@rodriguin2810
@rodriguin2810 3 жыл бұрын
I think you now, at the video of the simple calculator, for the different operations, you could use the eval built-in function. Like the global math variable of each function is the corresponding operator. For instance: def button_addition: global math math = '+' So then, in the equal function you use: e.insert(0, eval(str(f_num) + math + str(second_number)) Thanks for the incredible content!
@zackjandali
@zackjandali 3 жыл бұрын
The reason for setting command=myClick instead of command=myClick() is because “myClick” is actually a variable that contains the address of the function. “()” is the indicator to run the code stored at that address. It’s similar to an array and the subscript operators “[]”.
@Victor-tl4dk
@Victor-tl4dk 3 жыл бұрын
Why is lambda used? How does it work? 🤔
@intelchip_x86
@intelchip_x86 2 жыл бұрын
@@Victor-tl4dk lambda is used as a short form function, all you do is just this: z = lambda x,y:x+y ^ ^ | x and y are the parameters | z is the name of the variable that contains the function, you can call these functions like any other, z(1,4)
@mjpgannon
@mjpgannon Жыл бұрын
The image viewer is a great project to graduate my daughter from scratch to Python. Great work
@jibberish009
@jibberish009 3 жыл бұрын
Best youtube python video I've found so far
@laracombina
@laracombina 4 жыл бұрын
Thank you! I wasn't really sure about my skills yet, and its very difficult to undestard just by documentation, but the videos really helped me^^
@niharikajain2849
@niharikajain2849 4 жыл бұрын
U r literally doing a great work.. like teaching everything with such great efficiency and that's too free I loved the course
@coding_with_ash
@coding_with_ash Жыл бұрын
kzbin.info/www/bejne/d3SolGmtlt92h8U Plz check this awesome video also on the same topic. 🙏
@ravindrawiguna8681
@ravindrawiguna8681 4 жыл бұрын
I have another solution on the basic calculator, for the button click function. So instead of deleting what inside the entry widget, we just add the number in the position + 1(next position) to the current length of the entry widget. The code if i'm not wrong looks like this: def button_click(number): entry_data=e.get() e.insert(len(entry_data)+1, number) Like that 😄
@dwmkryft
@dwmkryft 2 жыл бұрын
I made a notepad programme following an online Tkinter tutorial; A LOT of code for a beginner (which I chose to type out rather than copy and paste.): this really helps the coding logic sink in to that part of your mind which turns knowledge into instinct. it was such a rush to see the end result, i immediately started looking for meatier content. 5 hours here we go!
@revatinatu7595
@revatinatu7595 Жыл бұрын
I owe it to him that I now understand tkinter. It helped me immensely to understand a project I am working on. Thank you
@chasekristovich8736
@chasekristovich8736 Жыл бұрын
THANK YOU FOR THIS FREE COURSE, YOU HELPED ME WITH MY INFORMATION TECHNOLOGY CLASS SO MUCH!!!!
@chasekristovich8736
@chasekristovich8736 Жыл бұрын
OMG ME SAMESIES
@connorwatson6794
@connorwatson6794 Жыл бұрын
@@chasekristovich8736 OMG ME TOO WE ARE LIKE SO TWINZIES :D :D :D
@vincentsnyder5077
@vincentsnyder5077 Жыл бұрын
@DrakeFan132
@DrakeFan132 Жыл бұрын
@chasekristovich8736
@chasekristovich8736 Жыл бұрын
@@DrakeFan132 Hey @Owen Griebau !!! Isn't the youtube comment section such a social and immersing place! 😄😄😄Have you watched Breaking bad????!?!??
@coolmanberr1738
@coolmanberr1738 4 жыл бұрын
I wanna thank you so much for this course. I needed to learn Tkinter for a school project, and now I think I am fully ready. That was extremely simple to understand. Thank you John for your course, I am sure I will join you in another course. HIGHLY RECOMMENDED!! ♥
@meroshango9603
@meroshango9603 4 жыл бұрын
Such amount if knoweldge... For freeeeee!!!! 🤯🤯🤯, this is sooo well explained and easy for new people, really apreciate this 👍👍👍👍
@jeffholland4248
@jeffholland4248 2 жыл бұрын
Awesome tutorial, super helpful! For anyone interested, I came up with a more compact way to code the calculator buttons (from about 43:00-48:00). Here's the code: from math import ceil NUM_BUTTONS = 10 buttons = [] for i in range(NUM_BUTTONS): buttons.append(Button(root, text=str(i), padx=40, pady=20, command=button_add) i_row = 4 - ceil(i / 3) # this will give row numbers 1, 2, 3, and 4 where appropriate mod = i % 3 i_col = (mod + 2) % 3 # this will give column numbers 0, 1, and 2 where appropriate buttons.grid(row=i_row, column=i_col)
@jeffholland4248
@jeffholland4248 2 жыл бұрын
Actually this places 0 on the right instead of the left, but this can be simply fixed: if i == 0: i_col = 0
@jonathanfairchild
@jonathanfairchild Жыл бұрын
This was an absolutely amazing course! I've been trying to learn how to make GUIs using different python libraries and this is by far the easiest route to take and the most comprehensive short course I've seen!
@traeldor
@traeldor 4 жыл бұрын
I would just like to say thank you for this video. While it is long, it is very comprehensive, and I have learned a ton in just the first hour. And without all the pickles, bacon, and belches. Thank You. I've been programming lightly for many years, and discovered python, while 2.6 was still the rave. 3 was just at the door, and to this day I still try to 'print data' and not 'print(data). hahahaha. I get Tkinter. Qt4 or 5 is easy enough but I like Tkinter. There is/was another GUI programming Style in C/C++, but I don't remember the name. Please keep up the great work. Looking forward to watching/learning the rest of it.
@Amankhan-cl1dq
@Amankhan-cl1dq 3 жыл бұрын
The best part is that we was also learning and recalling things while teaching us. Thanks for this tutorial
@aravindkumar4705
@aravindkumar4705 3 жыл бұрын
Do we need to learn python 1st to understand tkinter?
@Amankhan-cl1dq
@Amankhan-cl1dq 3 жыл бұрын
@@aravindkumar4705 Of course you need to be very good in python before start learning any python library or framework
@aravindkumar4705
@aravindkumar4705 3 жыл бұрын
Ok, thnx for u r information bro😊
@Armando_Lara
@Armando_Lara 5 жыл бұрын
Thank you very much John! You've really helped me to develop my end of semester project. Cheers!
@joydeepsaha1580
@joydeepsaha1580 4 жыл бұрын
What project did you made
@Somedude48
@Somedude48 3 жыл бұрын
Huuuuuge respect for making a >5 hour vid withount any ads!
@codebuzz
@codebuzz 2 жыл бұрын
Thank You Soo much! I know how to make cml based apps but I will hopefully learn gui based apps as well:)
@omerlutfukarakelle4157
@omerlutfukarakelle4157 4 жыл бұрын
in 55:35 i figured out this problem in better way def button_click(number): e.insert(END, number)
@schaf7716
@schaf7716 3 жыл бұрын
Yeah, did the exact same thing too lol
@engr.md.shahriarforhad1091
@engr.md.shahriarforhad1091 3 жыл бұрын
A really great tutorial, helped a lot with crystal clear explanation. Thanks a lot.
@AliSaad-xk8xh
@AliSaad-xk8xh 3 жыл бұрын
3:02:43 for those who are asking why is it from_ instead of from to differentiate between from that is used for importing and from for the slider
@coding_with_ash
@coding_with_ash Жыл бұрын
kzbin.info/www/bejne/d3SolGmtlt92h8U Plz check this awesome video also on the same topic..🙏
@maazshaikh7905
@maazshaikh7905 2 жыл бұрын
Very simplified course. It solved my doubts regarding fetching values properly from some widgets. I was able to successfully connect my login form to a database with the help of this course. Thank you so much.
@ankitkhivasara7621
@ankitkhivasara7621 3 жыл бұрын
from 42:00 to 1:18:00 calculator, you can use following code: from tkinter import * tk=Tk() x='' def clicked(n): global x if (n=='clear'): x='' elif (n=='equal'): x=eval(x) x=str(x) else: x=x+n l1.configure(text=x) l1=Label(tk,text='',font=('Arial Bold',10));l1.grid(column=0,row=4,columnspan = 4) d0=Button(tk,text='0',font=('Arial Bold',15),command=lambda:clicked('0')).grid(column=1,row=3) d1=Button(tk,text='1',font=('Arial Bold',15),command=lambda:clicked('1')).grid(column=0,row=0) d2=Button(tk,text='2',font=('Arial Bold',15),command=lambda:clicked('2')).grid(column=1,row=0) d3=Button(tk,text='3',font=('Arial Bold',15),command=lambda:clicked('3')).grid(column=2,row=0) d4=Button(tk,text='4',font=('Arial Bold',15),command=lambda:clicked('4')).grid(column=0,row=1) d5=Button(tk,text='5',font=('Arial Bold',15),command=lambda:clicked('5')).grid(column=1,row=1) d6=Button(tk,text='6',font=('Arial Bold',15),command=lambda:clicked('6')).grid(column=2,row=1) d7=Button(tk,text='7',font=('Arial Bold',15),command=lambda:clicked('7')).grid(column=0,row=2) d8=Button(tk,text='8',font=('Arial Bold',15),command=lambda:clicked('8')).grid(column=1,row=2) d9=Button(tk,text='9',font=('Arial Bold',15),command=lambda:clicked('9')).grid(column=2,row=2) add=Button(tk,text='+',font=('Arial Bold',15),command=lambda:clicked('+')).grid(column=0,row=3) sub=Button(tk,text='-',font=('Arial Bold',15),command=lambda:clicked('-')).grid(column=2,row=3) mul=Button(tk,text='*',font=('Arial Bold',15),command=lambda:clicked('*')).grid(column=3,row=0) div=Button(tk,text='/',font=('Arial Bold',15),command=lambda:clicked('/')).grid(column=3,row=1) clr=Button(tk,text='c',font=('Arial Bold',15),command=lambda:clicked('clear')).grid(column=3,row=2) equal=Button(tk,text='=',font=('Arial Bold',15),command=lambda:clicked('equal')).grid(column=3,row=3) tk.mainloop()
@flyirv8092
@flyirv8092 2 жыл бұрын
fucking legend. I was having so many problems with this. I don't know why but at some point in the video it just stopped working for me although i did it exactly the same way. Thanks for this
@pawlack
@pawlack 3 жыл бұрын
In first task - making calculator we can use "eval" function that calculates formula from string. eval("(3+5)/2") = 4, so we can make buttons just append to string. This way user can also just type formulas in textbox and equals sign will calculate it.
@gigachadkartik
@gigachadkartik 5 жыл бұрын
Yeah Mister White! Computer Science!
@debajyotimajumder2656
@debajyotimajumder2656 4 жыл бұрын
he likes knock knock jokes
@crazycat2969
@crazycat2969 4 жыл бұрын
xD
@ynandal
@ynandal 4 жыл бұрын
4 to the 5 to the 1 . Yoo BIYAACH
@priyanjaygoswami9595
@priyanjaygoswami9595 3 жыл бұрын
kzbin.info/door/VaA21W8rSAt-ZaCH1dfOjQ
@fedos
@fedos 4 жыл бұрын
One of my CS professors always puts an underscore at single-word variable names to avoid confusion when writing documentation.
@victorialeigh2726
@victorialeigh2726 2 жыл бұрын
John... Your tutorial is MASSIVE!
@Turco949
@Turco949 Жыл бұрын
Kudos to this guy and the channel for the wealth of free information they offer plus, the one-time fee $27.xx is nothing if you compare it to the price of one decent technical book you'd buy nowadays.
@InterfaceMehedi
@InterfaceMehedi 2 жыл бұрын
1:39:47 my_label = Label(image=image_list[image_number-1]) actually we have to count from end. That why we use -1. because -1 count from negative index. All the best guys! Happy Programming!
@adamghantous6263
@adamghantous6263 Жыл бұрын
what does counting from end mean?
@pam6489
@pam6489 4 жыл бұрын
After the lesson of the buttons I tried to make an calculator, then I failed horribly, ended up with a line of buttons from 0-9 that did nothing, after that I saw that the next episode was about making a calculator🤦‍♂️
@prosalmanplays7985
@prosalmanplays7985 4 жыл бұрын
Lol !!! But , keep it up..... Even i am doing this tkinter course to implement a GUI for a dictionary application i developed which works on Command prompt as of now.....
@urjitchakraborty5813
@urjitchakraborty5813 4 жыл бұрын
@@prosalmanplays7985 i am making a login system
@steven-fq1lv
@steven-fq1lv 4 жыл бұрын
I think you used get method in a packed or grid variable
@jatingera924
@jatingera924 4 жыл бұрын
@@urjitchakraborty5813 is java better for cloud based apps and for making website or tkinter works best
@urjitchakraborty5813
@urjitchakraborty5813 4 жыл бұрын
@@jatingera924 neither
@phantomapprentice6749
@phantomapprentice6749 5 жыл бұрын
Thank god for fast playback! and thanks for making this course of course
@ernestboston7707
@ernestboston7707 3 жыл бұрын
As of this moment, WHO are the 503 people who could possibly give this video a thumbs down?!?!?!? I have really been enjoying this, about 40 percent of the way through it.
@ernestboston7707
@ernestboston7707 3 жыл бұрын
@Annoying Elitist give details
@almohandisca
@almohandisca 2 жыл бұрын
Watched the whole video non-stop. Great work thank you for this tutorial!
@abhachhabra2762
@abhachhabra2762 4 жыл бұрын
I really liked your tutorials. They are easy to understand.Could you post some on Selenium e.g. how to do screenshot etc.
@medsmati2063
@medsmati2063 4 жыл бұрын
Hello Mr John, I want to give you the explanation of the strange behavior of checkbutton when we use string value instead of integer value. the line of code concerned is: c = Checkbutton(root, text="Check this ...", variable=var, onvalue="On", offvalue="Off") when you used an integer value, possibles values are 0 or 1, and the default value for integer is 0, it is why by default it is unchecked; but when you used string value and you defined the values "On" and "Off", the default value for a string is an empty string "" which doesn't exist between the 2 values you choosed; that means that the checkbutton starts with neither the value corresponding to unchecked nor the value corresponding to checked. To correct this, we can initialize the string variable with, for the example, "On" (if we want it to be checked initialy) or "Off" (if we want it to be unchecked initialy). var.set("Off") cordially
@vandinem
@vandinem 5 жыл бұрын
Following the tutorial in Ubuntu 18.04, and have learned the following: Instead of "Lambda", use "lambda" (lower-case "L").
@Codemycom
@Codemycom 5 жыл бұрын
yeah, it's lowercase in the video too...sublime just makes it look sort of capitalized.
@MrSparatacus
@MrSparatacus 4 жыл бұрын
Thanks a bunch that had me stuck for ages.....
@chris_sndw
@chris_sndw 4 жыл бұрын
And icons don't really work because Ubuntu doesn't have icons on the left top. I'm just 2 hours in so maybe there is more.
@carrickmullin5547
@carrickmullin5547 4 жыл бұрын
this helped a lot, thanks!
@khoiangphuocnguyen2592
@khoiangphuocnguyen2592 4 жыл бұрын
tks very much for your useful comment. at first, I entered Lambda and it went wrong. I was really confused. but then I read your comment and everything went good!
@gold4963
@gold4963 3 жыл бұрын
Personal bookmarks. 7:28. How simple Tkinter is. 34:38. Example code of how to make input field. 53:25. Quick lambda function example. 1:59:45. Personal bookmark. 2:13:25. Basic radio button functionality. 2:22:42. More proper radio button functionality.
@Steve-pg1ru
@Steve-pg1ru 10 ай бұрын
Thank you for this video. All respect. Your explanation is perfectly explained pedagogically/didactically and especially the peace you radiate. I think many will be happy with you. Excellent!
5 Good Python Habits
17:35
Indently
Рет қаралды 624 М.
Using tkinter with classes
28:23
Atlas
Рет қаралды 71 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 135 МЛН
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 4,7 МЛН
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,5 МЛН
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
Python Tkinter Full Course for free 🐍
4:00:25
Bro Code
Рет қаралды 382 М.
This Should Be Impossible...
23:05
Alec Steele
Рет қаралды 221 М.
Python Tkinter GUI Design Using ttkbootstrap - Complete Course
3:23:58
freeCodeCamp.org
Рет қаралды 343 М.
SQLite Databases With Python - Full Course
1:29:37
freeCodeCamp.org
Рет қаралды 687 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,4 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 687 М.
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 93 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 135 МЛН