WEBVTT

00:01.200 --> 00:01.720
Okay.

00:01.720 --> 00:02.040
Here.

00:02.040 --> 00:07.320
You see, while we execute this, we see a lot of send one packet here.

00:07.320 --> 00:08.960
We need to handle this okay.

00:09.320 --> 00:11.440
And handling that is very easy.

00:11.560 --> 00:16.960
Let me clear this and let's go back here.

00:17.080 --> 00:20.000
As you see here we have a function called send.

00:20.960 --> 00:23.040
And we have an option for this.

00:24.160 --> 00:25.760
That is the verbose okay.

00:27.760 --> 00:30.800
Verbose is equal to.

00:33.400 --> 00:34.040
False.

00:34.600 --> 00:40.600
Now if I save it and execute this again you will see nothing.

00:40.640 --> 00:41.080
Okay.

00:42.320 --> 00:46.760
Right now the program is executing but the user is seeing nothing.

00:46.760 --> 00:49.600
That is because we are not printing anything at all.

00:49.880 --> 00:53.800
Let me cancel this and I'm back here.

00:53.800 --> 00:55.720
Right here into the while loop.

00:55.720 --> 00:56.920
I need to handle this.

00:56.960 --> 01:00.000
Okay, here I'm going to use a counter.

01:00.440 --> 01:01.720
So let's create a counter.

01:01.760 --> 01:09.440
Let's name it send packet count send underscore packet count.

01:09.480 --> 01:10.680
It is equal to zero.

01:10.720 --> 01:18.190
Right now it is going to be equal to nothing okay means zero after we send two packets, we need to

01:18.230 --> 01:20.830
update the app to update this.

01:21.510 --> 01:24.710
Each time we send we need to implement this by two.

01:25.310 --> 01:32.710
So here it is going to be send packet count is equal to send packet count plus two.

01:33.710 --> 01:34.550
Okay.

01:34.750 --> 01:37.830
Now it's time we send a packet to packet.

01:37.870 --> 01:38.790
Okay one and two.

01:39.670 --> 01:45.350
And each time this loop is finished uh it will increment this okay.

01:45.350 --> 01:50.030
For example, the first time it sent two packet and come here and increment this by two.

01:50.470 --> 01:54.190
And the second one and it moves and continues.

01:54.670 --> 01:57.670
And also after that we can print a text here.

01:57.670 --> 02:02.350
For example, uh how many packets have been sent.

02:02.350 --> 02:03.750
So here very easy.

02:03.790 --> 02:05.710
We can use print method here.

02:07.470 --> 02:08.350
Let's use.

02:10.470 --> 02:11.630
Something like this.

02:11.830 --> 02:16.270
And we can say that how many packets and I could send.

02:17.670 --> 02:21.390
Okay let's concatenate this with str.

02:21.390 --> 02:25.790
And here we have the send packet count okay.

02:25.830 --> 02:26.990
Now let's save it.

02:26.990 --> 02:30.030
You may ask that why did you use str function here?

02:30.030 --> 02:33.340
I already explained this for you because they sent packet.

02:33.380 --> 02:36.100
It is a string and send packet count.

02:36.140 --> 02:37.380
Here it is integer.

02:37.620 --> 02:42.300
It contains integer inside this and string and also integer.

02:42.340 --> 02:44.700
They both cannot be concatenated.

02:44.700 --> 02:47.260
So we need to change the integer to string.

02:47.260 --> 02:50.660
And then we can do concatenation.

02:50.700 --> 02:54.780
Okay here let's re-execute this.

02:57.100 --> 02:58.500
Now just a moment.

02:58.500 --> 03:05.100
You see send to packet for packet six packet it packet ten packet.

03:05.100 --> 03:07.500
And a lot of that okay.

03:07.500 --> 03:10.740
So right now it is working also okay.

03:10.900 --> 03:17.580
But it's not also very good because it is moving like this okay.

03:17.620 --> 03:21.380
And I don't like this okay I want this to be static okay.

03:21.420 --> 03:23.660
Not to get a new line.

03:23.660 --> 03:27.060
In the first line I want to add this this number.

03:27.060 --> 03:35.660
And also while I am canceling this, you see it is telling that Keyboardinterrupt didn't do a lot of

03:35.660 --> 03:36.580
things.

03:36.580 --> 03:39.580
So these are some error that we need to handle.

03:39.580 --> 03:44.220
And also this text that is showing here needs to be in one line.

03:44.260 --> 03:44.900
Okay.

03:44.940 --> 03:48.860
Let's go and see if is it possible to do to handle it or not.
