So, guys, in this video, we are going to see the fighting put out, but that means you create the
fighters and we will read the content from the fighters and we write the content to the fans.
So first we will set fire to descriptor.
So this will be like object to the fire.
We specify and generally this is called fire descriptor and it holds some value for this opening the
fire we need to set open of.
So you need to open a file.
And let's say the fire is this black nativity.
And it's just for our congratulations.
We are going to click on the properties and get the part.
Let we copy the part now, I need to base this part.
So we need to put the back was fresh so that there would be no special characters and to say in what
more do you want to open the fight?
If I say read more after it, then we can only read the contents of it so far.
Now he only read more and that's the contents.
And if did read.
Now, the content contains the content, which contains the data of this file.
So now we can just print the contents.
And now I trust we will close the file using this file descriptor that Duclos, so first we have opened
this story and put this.
So we are opening this flooding in the remote and we are reading the contents using this read matter
and we are printing this.
And finally, we are closing the file descriptor.
So it's a better way to cross fire descriptor.
And if we run, this will get the contents of the text for which is that congratulations.
So you can also speak for a number of bytes you want to read.
If I see for a photo now or read the first four characters of the text, that is different.
If you do not specify you are, the contents will be, uh, read from the file.
Can see all the contents have been displayed.
Now let's assume that there is no file.
Sorry.
No, we want to read the file.
So to do that you need to write more.
And after reading the contents and its contents is equal to.
Success.
So this is some string and we will write to the file if they're not right.
So now let's go ahead and.
Coffee, the same lines here, and pushed over so fast during the conference, and we are riding the
success too.
So let me run this program to see what contents.
It's OK.
It's being read, it is not permitted.
What I want you to read WPX.
All right, sorry, we need to specify what we want to write.
I just want this for.
We did not get any.
So one way to find out is we need to bring to the Ifti that this will place the Casser, this unit at
the location of Fort Carson in this picture.
So this is the zero Kazar and.
OK, first, in order to have the content right, we do not we do not have confidence.
OK.
So we have got the success in the picture, but I don't know why it's not showing enough of interpreter.
So as you can see, the contents have been changed, but I don't know why it's not showing in this.
So, OK, let's just move on.
So we are reading and we are printing the contents of this file.
It's a remote.
And now let's bring the contents.
So as you can see, the success we remember, so you can also there is this binary what if you are dealing
with the binary or you want to be you are dealing with the binary data.
So what do you want to write?
Something hexadecimal for that matter.
If their data is encoding, then you read binary more or you can say the binary more.
So for now, that's w press to write more.
So let me put this as remote and no, let's see, we have this success right now.
Let's change that to some rented.
It's a flat Biton, he's also.
So in order to do this and run campaign, it says by flag flaggers, Python is awesome right now, I
don't want to lose it.
First, a file caster will be placed at the starting point.
This is a gyro index.
And whenever we have performed the real from this point on what the contents are, the file will be
written in the right set.
And now you can change this cursor to any of these indexes.
Open press.
So let's say next fight I think you'll want to do for index four onwards, then the contents from the
open press will be read.
So we are going to change the cursor from before the opposition to this fourth position.
So to do that, we need to say you have three Dot Sitkoff and we need to see four rate four from zero.
So there are two parameters.
You want to see the offset from zero.
So from zero this onwards, you can see four, uh, presses ahead.
You will see this one is a fortress.
So now let's try to read this one.
And as you can see, we did not get the flag because the castle is in the fourth position, that is
on the fifth element and from Fifth Element on what's the 3D printer.
You can also print the castle.
You have to doubt if, Peter.
And now I'm going to copy this line and just pasted in here to see the difference between them, as
you can see, the cursor is a the location and then it has to form and then the content from the photo
index have been printed.
So there are some general properties of this file, you can say of name, print 250 the name.
So this is a variable that contains the name of the file we are operating with.
As you can see, it got the full part from that cedar tree.
And you can say, A, that is open, it returns to all of us whether the file is open or not.
I think.
OK, I think it's gross.
Since we are not we did not close yet the footprint before this gross matter.
It will show you first because the fight is not close.
So that's what these fighting.
But I hope you have understood this.
This is very important.
And we be seeing in this, uh, expert our videos of before we write our expert in Boston that we will
create a file.
But in binary, what?
So shall I told you the normal.
And there is also happened more and more.
The difference is the concern will be placed at the end of the file.
You can change the castle location to zero with the seek method, but we will just use the read and
write for main purposes.
So check the open method as well.
It's just the castle at the end and if you want to write something, it will be appended at the end.
That's the only difference between.
Right and so that's what this do.
I hope you have understood.