#100DaysOfCode in Python Transcripts
Chapter: Days 94-96: Rich GUI apps in Python
Lecture: Concepts: Gooey
0:00 Now you've seen how easy it is to create a GUI
0:02 from a command line application.
0:05 Let's go and review the core concepts.
0:07 So it all starts with the Gooey library,
0:10 so we're going to import GooeyParser,
0:13 to get the, to actually show the UI
0:15 and get the input,
0:16 and then Gooey to indicate
0:18 here's the method that runs,
0:19 that triggers the Gooey application.
0:22 So we got to apply that decorator,
0:24 uh, the best place I found is right on the
0:25 main method here,
0:27 and we can give it things like the name,
0:29 and the program description,
0:30 and that actually shows up in the UI,
0:33 then when we actually want to get the data,
0:35 we did this is another method
0:36 but you could just do it straight in line here
0:38 We're going to configure the parser,
0:40 create it at a argument,
0:41 we saw that it can be simple text,
0:43 or you know all sorts of widgets,
0:45 that we can put in here and those are cool.
0:47 And then to actually show the UI
0:49 we're going to parser.parsarcs,
0:50 and then what comes back as Gooey args,
0:53 we just say .whatever your called the variables
0:56 .mode, .searchterm is the two that we used,
0:59 of course you can have arbitrarily many,
1:01 and you can make up those names, so
1:03 so just make it consistent,
1:04 and you're off to the races.
1:05 It's standard python at this point.
1:08 You provide feedback for, sort of the rest of
1:10 your app through just print statements,
1:12 and those will land in that little
1:14 text window in Gooey
1:16 in the Gooey GUI
1:18 so it's really nice. Straightforward and simple.
1:20 If you just want a quick and simple
1:22 GUI application,
1:23 this is what you do!