Okay, now our program is working perfectly, but there is some kind of issue that needs to be handled.
One of them is the console.
Okay, whenever we are trying to execute this program, we can reverse that, reverse back to the text
and double clicking on this reverse back to here.
You see, whenever I double click this, we see this terminal here, that this is one of the issue that
we are going to handle.
And also another issue that I want to handle is that sometimes when I use exit command here, this will
give me an error, not this error okay.
An error on windows machine okay.
Sometimes it happens.
And that is because whenever we are trying to exit here, we are not exiting that by using this command
okay.
Whenever I use this command.
So after that I will be able to uh exit successfully.
So import this here.
Okay.
And whenever I use this I exit that is here.
So I just use this dot exit.
And this will exit the program successfully without any error.
So this is one of the issue that sometimes may be happen not all the time just sometimes.
And now it is handled.
The next thing is about uh about packaging and also uh, not showing the terminal.
Okay.
So let's use CLS here to clear this command.
Okay.
This as you see by by using Pyinstaller Inspector no.
One file, I package the whole thing, which is here into an exe file.
Okay.
And also if you want to, uh, to run this program without any console, you need to add one more argument
here.
And that is no console Okay.
So by using this new console, your program will be executed without any console.
Okay.
So and still there is another problem.
Okay.
There is no console.
Will work with everything but not with things that they are handling that they are working with input
and output.
So we need to handle those things separately like check output command.
So do we have any function by the name of check output command here or not.
If we have it.
So that is not going to work with them.
We need to add more details to them.
As you see we have check output here that they are working or they are handling or they are dealing
with output and input on terminal.
We need to add two more arguments here to handle this.
So the first one is the STD error.
Okay.
That is called STD error.
So it is equal to sub process okay.
Sub process dot.
Dev null okay.
This is one of them.
And also we need another thing that is is TD in is TD in.
Okay.
So it is also equal to subprocess dot.
The process dot.
Dev null.
That is here.
Okay.
Now this is going to work perfectly.
And let me save this.
Let's go back and repackage this with no console and try to hit enter here.
No console.
Hit enter.
Just wait a moment.
So after it is completed and you will be able to run this program without the console.
Okay, let's see that.
Now as you see, it is completed.
And now if I just come back here and open this, you see we have our reverse factor here.
Now, if I move this into any computer that even the python is not installed, it will be able to work.
No problem at all.
Okay.
And here in the Linux, let me use clear here and run the listener from here.
Let's go back to Windows Machine okay.
And double click this right now.
You see the mouse is changing.
That means it looks like something is happening okay.
But we don't see any kind of terminal or cmd or anything.
Okay.
And also we are not seeing anything into the taskbar.
Let's go see if See if we got any connection.
We got a connection here.
Now, if I use dir, you see, we see the details, which is here.
Okay.
For example, now I'm using the city command to go into something like here.
Okay.
Let's use this CD to the dir.
Hit enter.
And uh, looks like it's not working okay.
It's just waiting.
Uh.
No problem.
Let's use Ctrl c and.
Uh, okay.
Close it.
Let me let me come back here.
Hit enter.
Um, and re-execute this.
We got the connection.
Dir.
Okay, CD, for example, I want to go right here.
So it is working.
Now, if I use dir.
And you see now the details is changed, we have back dir.
Okay.
Again we have this.
That thing that I use.
Dir.
Dir is not.
It looks like it is not a folder.
Okay.
Something else.
Now if I again you go to try to go to this folder like this, let's use Siri command.
And then this hit enter and let's use dir again.
You see that we are back here into the reverse factor that x.
And again you see the dir thing here.
Okay.
I was not in a good mood while I was using the air.
So now you see that it is working perfectly.
Now, if I use exit here and hit enter, you see that it is exited.
And here you see nothing else happened.
If I check the task manager, maybe it will show.
Show nothing.
Okay.
At all.
So you see, now it's working perfect.
So thanks for watching and I will see you in the next lecture.