Okay.
In the previous lecture we were we were able to do this part.
Okay.
Uh, it looks like actually the user is typing something not like this.
Like we have a command keyword here.
We have, uh, quotation marks, and here we don't have it.
Okay.
So it looks better.
Now it's time to go for something else.
And that is reporting in the reporting part we are going to use uh, one more thing.
And that is called threading okay.
So here I'm going to remove this and log from here.
And then I'm collapsing this function.
And here I'm going to import.
Come on.
And.
I got.
Okay.
Import feeding.
Okay.
Import threading.
And now here let's create a function I'm going to name it I don't know.
Let's go.
Name it report.
You can name it anything you want.
It is going to be a recursive function.
What is a recursive function.
Whenever you are calling a function from inside of that function, that is called recursive.
For example here if I use report.
Report.
So right now it is a recursive function because I'm calling this function from inside of this function
okay.
This is called recursive.
So here we are going to use that log again.
So I'm going to use global log okay.
And let's print the log.
And also.
Uh, log is going to be equal to something like an empty string.
Okay.
Then we need to create a timer.
So this timer is going to be equal to reading dot.
Here we have a timer.
So we need to give a time to this.
For example right now you can give any time.
Okay.
For example I'm going to give this at least six seconds because I'm testing this.
And then I need to call the function f function any function here.
And you know that we are going to call the report function because it is going to be a recursive function.
So report function and you don't need to give this parenthesis here.
Okay.
Now I did called the report function and I did.
And I do have the timer.
Now it is time to start the timer.
Okay.
So we use timer dot start.
And this start is a function.
Okay.
And the next thing is to use this report function right here.
Okay.
You need to use this report function.
Call this report function before you start this report listener.
So let's use report here.
Now I'm saving this.
Let's go back here.
And let's clear this.
And also this.
Let's execute this.
Okay.
Let's say load.
This is me.
See after six seconds you see that we are having this one again.
If you print nothing, if you type nothing again it's going to print you an empty terminal or an Going
to text here.
Okay.
After six seconds again I'm going to say hello.
My name is in.
So just a moment.
Hello.
My name is in.
So after six seconds this will be reported.
Okay.
Now it it looks better now if I hit the enter or enter.
So you see the enter the enter key.
Enter key after six second.
Okay.
You can give more time.
For example you can you want to report this at least each hour.
So you can give uh, something like this okay.
And you will be good to go.
So now I'm going to leave this to be at least six second.
And right now it is working for me.
Okay.
Let's go and see how we can improve this better.