 Hey everyone and welcome back to another Python tutorial this time on the end-py screen a module and library That's a really cool thing We've been looking at so far that's been allowing us to rapidly create user interfaces for the command line I've had the documentation up. We're just getting started with learning about this thing So now we're moving into the next phase I wanted to show you really simply this wrapper basic function that gets us in and out of the curses mode Which is the mode that end-py screen works in all the time So let's read a little bit more about what we're going to be doing next The things that I want to introduce now are kind of the big overview as to how everything works And it's cool that it's only in like three components that work hand-in-hand There are form objects. There are widget objects and their application objects So the form objects are kind of what you're seeing all the time. They're the screen that's displayed on the screen Now widget objects are like the tiny little things that you use like, you know a text box or a button or I don't know widgets in Pieces of the user interface that you actually interact with the application objects are kind of the big Management stuff like they're the controller in the code that keeps track of everything for you so Let's actually go ahead and create some of the stuff the documentation kind of shows you how to build it and then of course using the tutorial that I was hinting at Earlier, they're doing some pretty similar stuff that we're doing. So let's just jump into the code and see how we can get it to work So like I said, we are still creating forms actually now because that's one of the crucial aspects of actually getting this stuff to work That's the screen that's being displayed on the screen We're still going to use our wrapper basic function to get us in and out of the curses mode now But pretty soon we're going to get away from this function like I said It's it's really unnecessary when you're working with actual applications of this stuff So let's keep our simple function. Let's keep the arguments that we've been using so far, but we'll create something new. Let's say form that's going to be an object that holds our n pi screen form and That's exactly what it is. It's an n pi screen Form now note. I'm using a capital F here I'm using a lowercase f for my object name now this takes arguments and The only argument that we can kind of pass in really now that would be beneficial to us is a name And that's kind of a keyword here You know that I'm using the name and equals and setting it equal as if we're keyword So we can say this is going to actually be the header or kind of the title of the form N pi screen form Exclamation point right so that's real simple and let's actually run the code now now that we've created it Hopefully we'll get some cool stuff, right? I'll see the end-pile learning and teaching. Oh I probably should have saved this as zero two All controls the everything and then we're say this is zero one Get me back into zero two cool Now I already roll I'll just use Python zero two so we don't have to change the permissions on it And Nothing happens Why is that we get that same like big jump that we saw when we were Initializing and getting out of the curses mode earlier, but we created this form. What's up? Why isn't it anything happening? Well, here's an interesting thing. This is a function again that you're probably never gonna actually use when you get into the actual application stuff like I like I said up at the top here these application objects They're gonna handle all this stuff for you, but I want to show you how it works in the background You know behind the scenes and behind the curtain so there are these functions form dot display and I'm sure you can kind of guess what that will do that will display our form for us now if I run this It displays it Here I'll try and resize it you can see Right at the top here. We got this got this kind of gray black box There was our title and pace and pie screen dot form it displayed it and then it just went away Well, that's not cool. I wanted it to stay up. I wanted the program to actually keep running, right? So this next one this next function that I want to show you is edit and What that will do is it will display the form and of course that you edit it as well Now you'll notice if I try and run this there's nothing in our form There's there's nothing there. We haven't added any widgets or anything We got this okay button down at the bottom down at the bottom right corner And that's how we can get in and out of our form. We can exit out of it Cool, so I hit enter and that's just what got me out of the got me out of it now so those are what I wanted to show you as Forms right because I wanted to get to each of the three different things that are kind of crucial in our end Pie screen applications of course form objects widget objects and application objects now I was telling you application objects are really the big kind of manager of all this stuff So we'll get into that next and then of course we can add more widget objects and actually learn more about it So the next tutorial is going to be all about building a better framework rather than using this weird simple function that we kind of using as a as a gateway to get in get into our form and Calling this wrapper basic function that we don't have to do and even calling this edit function that we don't have to do So hopefully you guys can look forward to that in the next tutorial. I know we're still on very very simple stuff But they are kind of small components and quirks as to how this library works And I want to show those off to you so you have a greater understanding for it So thanks for watching everybody. I hope you enjoyed this and may uh, what did I just say there? I was gonna say maybe I'll see you in the next tutorial, and then I was gonna say hey Maybe I'll see you in the next tutorial and it just sounded like May Oh getting too old for this stuff. All right. Thanks everybody. I'll see you in the next tutorial