Hello, everyone. Welcome back. This is Lesson six of Intro the Python on Cyber Eri on Man And I'm your instructor, Joe Perry. In this video, we're gonna cover the last objective of lesson six and we're gonna learn to use the python help and dirt functions. And we're also gonna take just a second to have a look at the python documentation.
to do this, we're going to work in our interpreter once again. Again. We're going to die Python three of the command line
and we're gonna open a python three interpreter.
The first time we're gonna look at is help now, help. As I said, it's a function which means that it is executed by putting the parentheses after it. We're not talking. We're not talking about functions very deeply yet. We'll do that in a later video, But once you run that command, it's going to it's going to open up this new sub program. That is the help program inside of the interpreter.
And you can see the instructions there, give it the name of a module or key. We're basically any python topic,
and it will if it has information about it. It will give you that information now. It can be a little bit tricky to use at times just because, for example, things like strings, which are very important components of python
you don't actually find by writing words strings. But it will try and give you information. For example, use helps stir for help on the store class. It will try and give you information about how to search for that and for whatever You're trying to get help.
Anyway, we're gonna look at an example of this, which is just going to be the print function.
So you can see here. If you're familiar with man pages, this is gonna look pretty familiar to you.
You've got your function at the top, and then after that you've got a description of how it's used, what arguments you would give it. And then you have an actual text description, prints the values to a stream or to assist out standard out by default. Sista STD O ut is standard out. That just means printed to your screen, which, of course, we've demonstrated, even if we don't really know what functions are yet we've demonstrated what print
actually does. This is just giving us an explanation, sort of
in a verbose way with more information about arguments.
So that's what helped. Looks like you can use help again for pretty much any module key order symbol. If it has documentation, python will be able to provide it.
You leave that just by typing. Quit. Now, that's different from quitting your shell, which is done with quit with parentheses in the help documentation. You just write the word quit.
So we've learned to use help. Now we learned used a render is a tricky one to explain without a lot of knowledge of python
because it deals with the topic called name Space is not something we're not gonna spend very much time on it. All right now, other than to understand that a name space basically just means
the current environment in which you're executing code and to give you a better way of understanding that are more clear way we're gonna run dirt right now without any other arguments with any information. So this is a fresh show. We haven't really done anything in it yet. It would modify any information, and you could see that we have these, uh this list of items with these underscores around them.
Underscores, basically are an indication in Python.
Those are internal functions. They're not really for use by for the probe by the programmer or by other programs or other modules. Those are built in parts of your current name space.
Now, if you want to see what names are, how you could modify a name space, a simple example would be creating a variable. But we will call X
another variable. We will call. Why
now? Nothing's happened here because we were assigning to these variables. So even though we're in a ripple which generally reads, executes and prints, it's not wrong to print because it's sending that information to the variable instead.
But we've got X equals one y equals a. What we're gonna do now is we're gonna rerun that dirt command,
and you can see the end of the list. These two new items have been included X and Y, and those air the variables we just created, and that's what the name spaces, and that's why I wanted to address it. What you're what this is is going to show you everything that is currently defined, that you can have access to.
Additionally, if you run it with command, for example, running it against one of those variables,
not what I meant to do.
You'll see a bunch more options. These are all of the things that are defined within the number variable. So these are all of the functions, the methods that numbers have access to.
And to give an example of that, we can see x dot numerator, which is actually not a method. It's a tribute.
The numerator, of course, of one is one,
and we're gonna get out and clear that screen. That's dirt, so that's helping. That's a dirt Those functions like a set of utility functions. Not only will they become easier to understand as we go forward and videos, you're gonna find more uses for them. You could do a bunch of stuff with both of those functions. I'll give you a ton of information, often times when you're trying to run down an error. Those are the places to start
because you'll be able to figure out what's happening with
the last thing I want to show you here. And I think I might still have it. Yes, have it up in my browser. The Python three documentation. This is it. Https colon forward slash forward slash docks dot python dot or GE
or those backslash and I can never remember which direction you call the slash. Either way,
Doc's not python dot or GE, and then it's the pylon. Three. That's seven dot to documentation. Specifically,
you can see here this menu you that python 3.8, which is still in debt for people who are using it ahead of time.
3635 and 27 Now, we're currently working in 36 But like I said, none of the coding we're gonna be doing in this in this part of the class or in this class, really in general is going to run into any differences between 36 and 37 So we're not gonna worry about
between now and the intermediate and advanced classes. We're gonna move on to actually using the proper python
that's a python help documentation. I shouldn't close that window.
Not done with it all.
That's That's the python help documentation. You could see that they have tutorials, library references, language references. In fact, this tutorial I do want to draw attention to is absolutely spectacular. It's all part of the python install. It's all part of I thought It's free to use and free to read.
I absolutely love it. And in fact, a lot of our material in this course is going to be based on information that tutorial
in the intermediate in the advance, we kind of step away from what the tutorial covers. But in this intro course, you can absolutely use that. That's one of the best supplemental resource is you can have access to.
All right, so that's the end of this video, and therefore that's the end of Lesson six in less than six. Again, we discovered we discussed the pylon syntax had to use python of command line, how to create an excuse python scripts and how to use the help and deter functions. All of those things again are going to not only make more sense, we become more relevant
with each passing video. I just wanted you to be introduced to them now,
so we're ready to roll.
in less than seven. We're going to discussing the python data types.
As always. I'm your instructor, Joe Perry, and thank you for watching this video intruder python here on cyber eri on demand