All right, now it's time to talk about the packages and the mojos in Python.
OK, so actually you can see or you remember when we created our first first file.
OK, now it's time to be more realistic.
OK, so here you can see that we have the first, despite now the first thing this make this directory
and its name it.
Biton underscore fights back and by the way, to remove this first python, we didn't need it anymore.
So it's clear the screen and it's go to the python.
Now, let's go to the python files.
OK, now we're inside.
Let's touch our first file and touch.
This is commonly used to create a text, but it's OK.
You can use whatever you want or you can use actually the video to do itself.
From here, you can create a new fight from here anyway.
They are the same.
Nothing important.
So many did.
But this is the main function.
And let's create another thing now.
This time we want to create, um, first the first something.
It's OK.
OK, now let's make another directory and this directory will call it functions.
OK, it's OK.
Just arbitrary names.
So we have the first date by the amended by and we have the functions now inside the functions.
So let's go to that function inside it.
We want to create another fight and this fight we would limit for one to by and let's create one to
date.
But OK.
And you can see it now let's fight open a fight or open a folder from here.
OK, and four there will be between fights.
OK, now.
OK from here.
And you can see that we have it here.
Let's get from this, we don't need it.
Yeah.
So you can see that we have the functions, we have the man.
We have the first dead body.
OK, so again, the first thing I will go to the man now, the men here, I will preprint.
This thing and this thing will be called.
This is managed by OK.
And the first year will be great.
This is.
First.
And the functions inside function one, let's define this function, function, whatever function this,
it's no big deal.
And this principle inside fun from fun one.
The Twi and Functor, let's have it the same as a fun one like this, but this time it will be from
fun to like this.
OK.
OK, so far, so good.
Oh, now I want for all of these to be connected together, all can be important to them.
So we will use this statement, which is the import statement, and I will import.
I don't think so, actually.
I can import my mojos library, for example.
For us, this is a library or a module can be imported using Python and it can use all commands on the
operating system.
We have some processes we have mapped, we have a lot of things, actually, but all of these are standard
or a built in.
Now, what if I want to add one of these?
I can do that.
It's OK.
So that the first thing you need to understand that we are inside the man and the man is the same level
as first.
So I can just add in board first.
OK, so if I am bought first, I can do whatever I want.
So, for example, inside first, let's remove the print statement.
This is what I equal.
All right.
And here from first, I want to print that, I think, but I can't print.
I like this.
I need to to modify or to add this thing, which is first time, OK, and is the variable inside the
first display, that one we we imported.
OK, so let's print this and run them in actually to check this out.
So let's return here.
You can see that we have them in by or Python three that mean that.
But yeah, everything is working as expected, which is still this is by date made it by as you can
see.
Now if I removed the first actually like this.
This will not work because it is not defined here.
Again, it's yeah, I is not defined because I is defined inside the first by which is equal.
This is inside the first Gesell to do or to understand or to import the inside the first.
You need to put first that I first then we can print it out.
All right.
And of course you need to import it first.
All right.
Now, what if I want to import these functions?
OK, I want to print the function, this function.
I want to call this function that inside one will do it.
But when one how to do that, I need to use the import.
Here you are.
Right.
But this time you can see that one one is not the same as the men, which is the one we are.
No, they are inside the functions directory.
So you need to put functions like this and then.
But that.
Simple and then use fun, won as expected.
Now, how to print that or actually how to call this function?
So I want to call this function, which is fun and that print this statement.
How to do that?
Well, you can do this.
By putting this thing.
Functions.
The fun one.
Now the fun with this, so this will call the function inside that fun one that inside the functions
directory.
OK, now hope this would work.
Let's see if it is working or not.
Now, let's clear the screen first and let's run it, yeah, inside.
Fun, fun, fun, fun.
And this is inside our this is meant despite.
Yeah.
Everything is working correctly.
Now, this is the same thing for fun, too.
OK, ok.
Now, let's return for the first.
OK, let's put a comment here, actually now by default, by the way, this is the comment in Python
and let's print the value from the first time.
OK, now we already show that we do not need to run it again.
But actually, what if I don't need this to be here?
I want to just print.
Um, I immediately.
OK, how to do that.
Well it is easy.
So Brent like this and yeah.
As you can see, Imbert first here.
This time, we will use this from.
Argument or from word?
So from first import start.
OK.
You can see that so I imported from first and bought everything, so this time I didn't need to.
But the first year you can see I can print.
I immediately saw it will print.
I promise.
Here.
OK, now let's check this out.
Yeah, you can see it has been printed without using first display inside the main.
Another thing.
So actually, this will be working on the functions as well.
So if I import functions without putting functions that by and I could the function.
But this time I called not one, and they think we already saw now this time I will print the phone
to get noticed, comment this print statement and see if this is working or not.
So you can see, yeah, Funchess has no attribute one to.
Why is that?
Because you can see that we import functions and inside functions, we cannot do anything.
So you need to specify fun to action.
So like this, now, if I type it, yeah, this is inside.
Fun, fun, fun to watch.
Thanks for watching.