WEBVTT

00:00.280 --> 00:09.160
Okay, now our program is working perfectly, but there is some kind of issue that needs to be handled.

00:09.760 --> 00:12.160
One of them is the console.

00:12.200 --> 00:17.880
Okay, whenever we are trying to execute this program, we can reverse that, reverse back to the text

00:17.880 --> 00:21.920
and double clicking on this reverse back to here.

00:21.920 --> 00:29.680
You see, whenever I double click this, we see this terminal here, that this is one of the issue that

00:29.680 --> 00:31.200
we are going to handle.

00:31.200 --> 00:39.400
And also another issue that I want to handle is that sometimes when I use exit command here, this will

00:39.400 --> 00:43.040
give me an error, not this error okay.

00:43.080 --> 00:45.360
An error on windows machine okay.

00:45.400 --> 00:47.480
Sometimes it happens.

00:47.480 --> 00:55.920
And that is because whenever we are trying to exit here, we are not exiting that by using this command

00:55.960 --> 00:56.160
okay.

00:56.200 --> 00:57.840
Whenever I use this command.

00:58.760 --> 01:06.760
So after that I will be able to uh exit successfully.

01:06.760 --> 01:08.690
So import this here.

01:08.730 --> 01:09.130
Okay.

01:09.850 --> 01:15.610
And whenever I use this I exit that is here.

01:15.610 --> 01:19.450
So I just use this dot exit.

01:19.450 --> 01:23.170
And this will exit the program successfully without any error.

01:23.170 --> 01:29.130
So this is one of the issue that sometimes may be happen not all the time just sometimes.

01:29.650 --> 01:31.410
And now it is handled.

01:31.650 --> 01:40.810
The next thing is about uh about packaging and also uh, not showing the terminal.

01:40.850 --> 01:41.490
Okay.

01:41.530 --> 01:44.850
So let's use CLS here to clear this command.

01:44.890 --> 01:45.730
Okay.

01:45.730 --> 01:50.890
This as you see by by using Pyinstaller Inspector no.

01:50.970 --> 01:59.610
One file, I package the whole thing, which is here into an exe file.

01:59.650 --> 02:00.250
Okay.

02:00.290 --> 02:09.810
And also if you want to, uh, to run this program without any console, you need to add one more argument

02:09.810 --> 02:10.050
here.

02:10.050 --> 02:13.830
And that is no console Okay.

02:13.870 --> 02:20.150
So by using this new console, your program will be executed without any console.

02:20.190 --> 02:20.590
Okay.

02:21.150 --> 02:25.670
So and still there is another problem.

02:25.710 --> 02:26.030
Okay.

02:26.070 --> 02:27.190
There is no console.

02:27.190 --> 02:34.910
Will work with everything but not with things that they are handling that they are working with input

02:34.910 --> 02:36.430
and output.

02:36.430 --> 02:44.990
So we need to handle those things separately like check output command.

02:44.990 --> 02:53.630
So do we have any function by the name of check output command here or not.

02:53.670 --> 02:54.830
If we have it.

02:55.030 --> 02:58.190
So that is not going to work with them.

02:58.230 --> 03:00.590
We need to add more details to them.

03:04.190 --> 03:11.590
As you see we have check output here that they are working or they are handling or they are dealing

03:11.590 --> 03:14.710
with output and input on terminal.

03:14.710 --> 03:18.750
We need to add two more arguments here to handle this.

03:18.750 --> 03:23.120
So the first one is the STD error.

03:23.160 --> 03:23.560
Okay.

03:23.920 --> 03:27.360
That is called STD error.

03:27.440 --> 03:32.640
So it is equal to sub process okay.

03:32.680 --> 03:36.080
Sub process dot.

03:38.280 --> 03:40.240
Dev null okay.

03:40.520 --> 03:41.680
This is one of them.

03:41.800 --> 03:49.520
And also we need another thing that is is TD in is TD in.

03:49.560 --> 03:50.200
Okay.

03:50.240 --> 03:53.120
So it is also equal to subprocess dot.

03:55.320 --> 03:56.760
The process dot.

03:59.040 --> 03:59.880
Dev null.

04:01.200 --> 04:01.720
That is here.

04:01.760 --> 04:02.200
Okay.

04:02.600 --> 04:05.920
Now this is going to work perfectly.

04:06.800 --> 04:08.800
And let me save this.

04:09.080 --> 04:17.240
Let's go back and repackage this with no console and try to hit enter here.

04:22.000 --> 04:24.240
No console.

04:26.940 --> 04:27.620
Hit enter.

04:28.060 --> 04:29.300
Just wait a moment.

04:29.300 --> 04:39.140
So after it is completed and you will be able to run this program without the console.

04:39.180 --> 04:41.060
Okay, let's see that.

04:44.780 --> 04:47.060
Now as you see, it is completed.

04:47.060 --> 04:55.980
And now if I just come back here and open this, you see we have our reverse factor here.

04:56.020 --> 05:02.020
Now, if I move this into any computer that even the python is not installed, it will be able to work.

05:02.020 --> 05:03.060
No problem at all.

05:03.060 --> 05:04.540
Okay.

05:04.580 --> 05:13.100
And here in the Linux, let me use clear here and run the listener from here.

05:13.100 --> 05:15.620
Let's go back to Windows Machine okay.

05:15.620 --> 05:17.700
And double click this right now.

05:17.700 --> 05:19.060
You see the mouse is changing.

05:19.060 --> 05:23.060
That means it looks like something is happening okay.

05:23.100 --> 05:26.980
But we don't see any kind of terminal or cmd or anything.

05:27.020 --> 05:27.540
Okay.

05:27.580 --> 05:30.500
And also we are not seeing anything into the taskbar.

05:30.500 --> 05:33.150
Let's go see if See if we got any connection.

05:33.150 --> 05:34.390
We got a connection here.

05:34.390 --> 05:39.390
Now, if I use dir, you see, we see the details, which is here.

05:39.430 --> 05:39.710
Okay.

05:39.750 --> 05:46.350
For example, now I'm using the city command to go into something like here.

05:46.390 --> 05:46.790
Okay.

05:48.230 --> 05:53.270
Let's use this CD to the dir.

05:53.310 --> 05:54.150
Hit enter.

05:54.830 --> 05:59.590
And uh, looks like it's not working okay.

05:59.630 --> 06:00.870
It's just waiting.

06:02.190 --> 06:02.310
Uh.

06:02.310 --> 06:02.990
No problem.

06:02.990 --> 06:05.830
Let's use Ctrl c and.

06:09.310 --> 06:10.710
Uh, okay.

06:11.950 --> 06:12.630
Close it.

06:12.910 --> 06:14.670
Let me let me come back here.

06:16.230 --> 06:18.750
Hit enter.

06:18.790 --> 06:23.310
Um, and re-execute this.

06:23.710 --> 06:24.670
We got the connection.

06:24.670 --> 06:25.270
Dir.

06:25.310 --> 06:28.350
Okay, CD, for example, I want to go right here.

06:28.350 --> 06:29.030
So it is working.

06:29.030 --> 06:30.270
Now, if I use dir.

06:30.950 --> 06:37.030
And you see now the details is changed, we have back dir.

06:37.070 --> 06:37.590
Okay.

06:37.630 --> 06:39.650
Again we have this.

06:39.650 --> 06:41.330
That thing that I use.

06:41.370 --> 06:41.930
Dir.

06:41.970 --> 06:43.450
Dir is not.

06:43.570 --> 06:45.170
It looks like it is not a folder.

06:45.210 --> 06:45.650
Okay.

06:45.690 --> 06:46.490
Something else.

06:47.450 --> 06:55.930
Now if I again you go to try to go to this folder like this, let's use Siri command.

06:55.930 --> 07:01.010
And then this hit enter and let's use dir again.

07:01.290 --> 07:05.330
You see that we are back here into the reverse factor that x.

07:05.850 --> 07:09.850
And again you see the dir thing here.

07:09.890 --> 07:10.770
Okay.

07:10.810 --> 07:15.170
I was not in a good mood while I was using the air.

07:15.210 --> 07:19.210
So now you see that it is working perfectly.

07:19.210 --> 07:23.930
Now, if I use exit here and hit enter, you see that it is exited.

07:24.450 --> 07:27.650
And here you see nothing else happened.

07:27.650 --> 07:34.170
If I check the task manager, maybe it will show.

07:34.210 --> 07:34.770
Show nothing.

07:34.810 --> 07:35.050
Okay.

07:35.050 --> 07:35.570
At all.

07:36.890 --> 07:40.770
So you see, now it's working perfect.

07:40.810 --> 07:44.330
So thanks for watching and I will see you in the next lecture.
