It's final part we will make some locked management with python.
Now let's check how to convert the old config file with config file so we will convert some commands
with new ones for this purpose.
We can just use trick replace function.
Here are a text file as shown it's gonna show some parts of this character as an example.
First we open a file as old conflict variable which is between to read this string and assigned to X
can we use replaced function first parameter is old for loop.
And second parameter is the new value so here we change IP access could apply from inside to outside.
In the second code we change access lists 5 to 6 and permanent and
our list check if there is multiple same commons in configuration file.
Here we get.
Example is no IP address in first Internet 1.
And Mr. Turner.
2 we have the same config and we want to change first internet too so we we can make a replacement configuration
unique.
You can't get put in interface faster than 2 and no IP address.
Between them we use max backslash and it means enter signed between left and right.
Characters in the new value that we will enter interface first Internet backslash on and type address.
Same as console line password change.
We will do it.
Let's check it in by char
no contact text here.
Plus the Ten Network offers Internet to access lists and console.
So let's open that file first with open freak.
To extend
this old conflict which means open the conflict text with old config variable.
It's a cool old conflict dubbed read We will read this file it replace
IP access to find in the second parameter right in that group
5 0 0 0 we will change to inside to out can change IP address in the first Internet to 0 here regret
X took place.
Interface.
Internet 2 backslash.
We enter the second line and no IP address.
And we will add to the new value interface as Internet to like Slate and and we will enter the IP address.
If you print x printed you let's return it to the day before there is no IP address that threat.
I mean my IP address and hugs and IP access group 5 it was in.
But right now it's not so conflict replacement is like that it is very easy to call.