Okay.
Now let's continue and see how we can complete this.
Okay.
So here we are.
We have done it just for interface.
Okay.
Now let's go and do this for uh other one which was Mac address.
So parser dot add option.
And here for Mac address I'm going to use dash M and it is going to be Dash dash Mac okay.
And the value is going to be new Mac okay.
Okay.
How about help.
The help is going to be equal to.
Let's say new Mac address.
Okay.
Now it is done.
And it is not yet completed okay.
So as you see here, we have to think.
Okay.
Right here.
You see, we have to think.
And come on, let me show you.
We have dash, let me clear this first.
We have.
Dash.
Dash interface.
Which is going to be ETA zero okay.
And we have dash dash Mac which is going to be 0011 and 2233 and four four.
Four four 4 or 5 five okay.
So here you see two things.
One of them is the interface.
And then the value that we have here.
Okay.
So one of them is going to be the argument.
The other one is going to be the option okay.
So these are going to be the options.
And these are going to be the interface and dash dash Mac are arguments.
So we need to specify that right in here here Okay.
And we need to store these, both these two things into two variable.
Okay.
So how can we do that.
Let's create a tuple here.
I'm going to name it.
One of them is option.
And the next one is going to be argument.
Okay.
So we never we're going to we never use argument okay.
In our code.
And we always use options.
So we have option if you want to access the interface.
So you need to use option dot dist which is the value anything you write here.
Okay.
For example option dot interface will give you the interface option dot new Mac will give you the new
Mac address.
Anything you write into this.
This here.
Okay.
So here instead of giving these here I can use options.
Dot what is this this interface okay.
So let's use that interface.
And also this one.
Option dot new Mac.
So now save it and let's go again.
Let me see.
Okay Dash I okay.
Interface is going to be e th zero.
And dash m which is Mac address is going to be 0011 and 223344.
And we have for example seven seven.
Now let's hit enter.
And you see changing Mac address for it is zero.
And this is going to be the Mac address.
Let's uh use ifconfig and see if it is changed.
Of course it is changed.
Now this time I'm going to use dash dash Mac and dash dash interface okay.
Interface.
And let's change this to 99.
And you see we have no error.
And let's use ifconfig.
You see that it is changed successfully.
So now I think it is almost completed.
Okay.
The program and it is working perfect.
And as you see the code is kind of missing.
We could change this into a function because function is very good.
Whenever we use it we call it.
And if you need this in multiple times in multiple places.
So you need to copy and paste the whole code.
But if it is inside a function you only call the function.
Okay.
You just import the file just like this.
And then you can use the function.
That is very easy.
So let's go and do something with creating function, putting all this stuff into functions and use
it.