Video Outline! 0:17 - What we’re ultimately building 2:05 - Getting started 3:16 - The basics of every Tkinter App (Root) 4:44 - Add a button to the screen 6:20 - Passing in keyword arguments 10:07 - Using frames to organize widgets 11:53 - Setting custom colors 14:00 - pack() to place widgets 17:39 - grid() to place widgets 19:53 - place() to place widgets 25:49 - Setting the appearance of our final application 33:45 - Adding background image 36:00 - Implementing button/entry functionality 39:49 - Connecting to the Weather API 43:29 - Making a GET request 51:36 - Formatting our response 56:24 - Changing Font and Font Size 59:58 - How to add weather icons to the app 1:01:36 - Making our App an executable using PyInstaller Hope you guys enjoyed! Make sure to subscribe if you haven’t already :)
Definitely the best tutorial yet. I'm not exactly a novice but the fact that you took your time explaining "Why" you chose to do things a certain way was for sure something missing from other tutorials and will help a lot of people.
This was the second video of yours I’ve watched and I’ll be watching more. You speak *naturally* - you’re not reading from a script or mumbling; it’s like I’ve just sat down with you and you’re showing me something. Also, when stuff doesn’t happen just right the first time - that’s VERY real life - you’re modeling what to do - don’t panic just go back over stuff and figure out what you did wrong. Easy-peasy! I love this style of teaching, thanks.
He is teaching us by learning simultaneously which makes the video more natural. That's why I subscribed to him... Great job Keith. Keep going. Greetings from Turkey...
You're a wonderful teacher. Only just getting started in Python and you manage to make all the concepts incredibly easy to understand. Not only that, you're always going in and explaining why you're doing something, providing a real kick-start to the learning process. Thank you for uploading this!
What makes this tutorial better than any other tutorials on tkinter I have seen is, that you import the module as tk and not as * so that one can distinguish the tk calls from all the other stuff at first sight. You also don´t put everything in a class like many tutorials out there which only complicates things. I haven´t seen anyone else describe the place-function - which is a great tool to make the gui look professional.
This i can guarantee is the fastest and clearest way to learn the basics of interactive GUI python programming and API calls. Beautifully done tutorial! Many thanks , God Bless.
For people trying to this program while following him along, if you're not using sublime text you may have problems with the request function. In order for it to work go on command prompt and type "pip install requests" and then go to your code and "import requests". Hope this helped if you were stuck on this!
why did people have this problem? He mentions in the video about installing "requests" and then imports it as well!! :/ Edit: installs at 2:30 imports at 44:00
Thanks Keith, I learned a lot in this one. I started learning programming with Java in college, but I am finding Python much more fun to work with. I've finally got that motivation back for programming.
If you have problems loading the pic on a mac, try importing: from pathlib import Path then define the image path: image = Path('*your folder1*/*your folder2*/*your folder3*/*your_pic.png*') After that just add file=image: background_image = tk.PhotoImage(file=image) Thanks for the vid, Keith!
I had a hard time reading the "official" documentation as I guess it's not really well-maintained and updated. Following your video is such an efficient and effective way to kick start my Tkinter learning. Good job brother!
Thank you, Very thoughtful of the viewer. Hat tip to you sir on tutorials point. wow a goldmine. I appreciate the honesty in showing that a huge part of this is looking up things. When I started watching coding videos , I was scared I would need to memorize an encyclopedia. Big confidence boost here.
Really enjoyed your cool, calm and casual style - taking us through the "Design-Time" before run-time with a realistic demo was a great intro. Keep up the good work!
This was extremely helpful for me - I was able to follow everything and build my own front-end database form connected to SQLite just by using your tutorial as a template. Much appreciated!
Thanks for actually explaining the positioning methods. Strange, but I dont think any of the tkinter tutorials I watched before even mentioned place(), and its the most useful in my opinion. Best tutorial I've watched so far. You deff got a new subscriber
Thanks for being perfect. I am following you & sharing your videos with my friends from now on. This was really one of the best tutorial videos I've ever seen. You don't sound like a cold teacher, you describe things in your own words rather than definitions as much as possible, you are explaining the reasons behind your actions and choices , your sound is clear and understandable. Thanks for the video , keep up the good work bro.
I love the way you explain with help of google . it motivate me that google is available for your help. You explain how to use it. And your tutorial is always base on a project. which describe how things happened.
You are one of the most genius people I know in the USA, you are not a silly American Keith (referring to what you said at 45:30). Also, thank you for this tutorial.
I appreciate the support mohit! I'm sorry that I've been taking a long time to post new videos. I've been very busy with school/work. Will try my best to get them out quicker, but no promises.
I'm watching this from Brazil, and I can honestly say that this is a great video. Along with sense of humor, this tutorial is filled with good content and also showcases handy line codes. It's my first time studying GUIs, btw
Thank you for taking the time to do this. I am just beginning out in python, I enjoyed doing this project. Also it is amazing how a wrong letter is hard to find, lol.
Fantastic video! I am a beginner programmer, lol - more like a “wanna be” programmer. I started with Python and the related GUI Kivy. Your video enabled me to get a grasp on using API with Python. However, I was challenged by translating your Tkinter GUI into Kivy. I succeeded and created a Kivy Weather App. In connection, I only used one Python function / method. For my purposes and limited experience, I found using one function preferable. I have subscribed and intend to view more of your videos. Please keep up your efforts. I really appreciate your videos!!
@@lilystar5 You know when you import random or import tkinter? import requests is the same, except requests does not come with the standard python instal. You need to download it off the internet. There should be some command for that, but it is too early for me to remember that. Just google pip instal requests and see what you come up with. There are a whole bunch of libraries and modules you can download from the internet.
Thanks a lot! It helped me very much to learn the basics of python functions. I was having some issues in getting temp in Celsius, I resolved it by conversion from Fahrenheit to Celsius. I completed it just before adding icons.
Finally... This might be the first time I've heard someone mention "magic numbers" and why not to use them since my formal education years ago... Great vid :)
Thanks for the video! Very helpful. One small mod I added was being able to hit after the city. entry.bind("", (lambda event: get_weather(entry.get()))) # the entry.bind above, will allow the return to be pressed - same as clicking button.
Awesome tutorial man! Really enjoyed it - easy to follow along. The way you used "place()" function with relative positioning and sizing is something I have been searching for... I had been playing around with Kivy but always hoped Tkinter could do what I wanted. Tonight you showed me how. Thanks man :)
If your getting Pillow doesn't works properly, you might want to reinstall python, making sure that when you reinstall, you check the box that says 'Copy to path' or something along those lines. Helpfully saves a lot of frustration.
if any of you having a trouble with image display try importing from PIL import ImageTk, Image and then using background_image = ImageTk.PhotoImage(Image.open('your.png')) it worked for me
I'm sorry I am new to python. Could you show an example? I am using spyder, I typed exactly what Kieth typed but I get an error in regards to the background image.
Hi, I tried using what you said, and though the program didn't crash, The image didn't load up, it showed all the rest of the components(the labels, button and entry) but not the background image
What is that screen you left up at the end of your video (the one where you were PIP things into? I'm using Windows. Great video and I enjoyed your thorough explanations and the why you did things. A lot of other tutorial videos seem to lack the why, they seem more interested in just showing the how. Keep up the great work. My only suggestion is to create a list of your videos (in order from start to the latest). Just starting out in Python and "stumbled upon this video as a "suggested video" by RU-vid. Really enjoyed it. Thank you.
dude, you audio is clear and crisp! (it's been awhile since ive watched a tutorial with clear and crisp voice lol) is it the microphone or your audio editing skills that makes the audio sound great!?
Thanks man! It's a combination of my Sony mirrorless camera equipped with a Rode microphone. As long as the audio recording levels are set well, the audio comes out very crisp!
Thanks for the tutorial. I have been learning tkinter from other yoututbers and have read the docs but couldn't find a solution to make sure my widgets resized when you mess around with the window. Searched stack overflow and the official tk docs that recommended using grid_propagate(0) then adding 2 arguments (arg, weight=1) to rowconfigure and columnconfigure with weight being the supposed solution to my problem. Well, it didn't work. :/ Thankfully, I stumbled upon your video explaining how place() works instead of using pack() and grid(). Really appreciate the video. Keep up the great work. You've earned a new sub. 🙂
Great Video Keith, thank you! I learn so much from these. When using pyinstaller, add a -w flag and it will get rid of the blank window for Windows users. pyinstaller.exe --onefile --icon=sun_icon.ico -w WeatherApp.py
Would be good that you follow this up with a GUI building using PAGE, which is WYSIWIG drag-n-drop GUI builder that gives you the Tkinter code, once you built your GUI.
your app looks modern! it's not true what people say about ttk after all but i am into Qt for python (PySide2) right know and hope you do tuts on that since no one do that. thanks!
Somehow... there's a problem somewhere in the code structure because it doesn't work as we would expect. Anyway, besides the space you occupy in the video (better used to magnify the code lines...) I think you did a good job.