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