#100DaysOfCode in Python Transcripts
Chapter: Days 94-96: Rich GUI apps in Python
Lecture: Introduction to Python UIs

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Hello again, it's Michael. And we're getting really near the end of your 100 day journey. And I think this topic is going to be a really nice one
0:09 to round out some of the work that you've already done. We're going to talk about building GUI applications. That's right.
0:17 Windows applications, not terminal applications. You're going to work cross-platform just like Python, in fact, we're going to take it a step farther,
0:25 we're even going to bundle these up so nobody will even know you wrote them in Python. Right, you give them an .exe, or .app, or Linux binary,
0:33 and they can just run it. It's going to be amazing. Here is the simple application that we're going to build. Now, we're going to start pretty simple.
0:42 We're not going to build super complicated applications, but we're going to use a framework that basically takes
0:49 CLI, command line argument apps, and converts those into what we would have in some sort of GUI here. So, what might have been a command line argument,
0:59 the search term, or the mode, are now UI elements. One you can see is free form text, one is a dropdown. Really, really nice framework.
1:09 The framework we are going to use to build this is something called Gooey: G-O-O-E-Y. You know, it's a play on the spelling phonetics
1:16 of GUIs, I'm sure. But it turns almost any Python command-line program into a full GUI application in just,
1:24 maybe not one line of code, but just a couple lines of code. Really, really simple and easy. So, the bang for the buck on this one is amazing.
1:32 It's really nice to have a GUI application and yet it's really, actually not much work, if you're willing to accept a simple UI.
1:40 So, Gooey, we're going to do that. We talked about packaging Python applications. It's one thing to have a script that shows a window,
1:48 it's an entire another thing to give a simple, single application to a non-technical person who may or may not
1:55 have Python installed, who may or may not have the right version or any of the dependencies installed. Just give them one thing that they can run.
2:02 Like on Mac, it'd be great if they could just have like a movie search app they could double-click and it would run. Or on Windows, a movie search app
2:09 they could double click this .exe. There's nothing more to it. It's literally just this .exe file, you do that and you run it.
2:18 Or even, over here on Ubuntu. Give them the movie search app, they double click it, it runs. Don't have to set up Python,
2:24 it doesn't even have to be installed on the machine. Just like any other fully packaged application, it's ready to go.
2:30 For this, we're going to use something called PyInstaller. So, there's sort of two parts to this whole section.
2:37 We're going to one, build the GUI application. Two, an additional step to add this sort of packaged element in this distributable version to it.
2:47 It's really fun. I really hope you enjoy it and we're going to get started right now.


Talk Python's Mastodon Michael Kennedy's Mastodon