Is there any way to keep the execution window running even if I turn it off?

Asked 2 years ago, Updated 2 years ago, 23 views

I'm currently using Python. If you turn off the window that usually appears during execution, the code execution stops I want to keep the code running even if I turn off the execution window, is there any way I can do that? I'd appreciate it if you could let me know if you have one.

python

2022-09-22 18:37

2 Answers

You have to ask a good question.

The operating system you use or the commands you run...You need specific information to give an accurate answer.

First of all, based on the question, I think it would be Windows to express it as an execution window...

For Windows, pythonw.exe will be provided. If you run with it, the black window (cmd) won't pop up.

If you want to run it in the background, you have to register it as a service. This part has a window service event, so you have to implement it.

*ix allows you to ignore hangups using the nohup command, as shown in the answer above. This means that the service does not stop when a session or window is closed.

~$ nohup python sample.py & 


2022-09-22 18:37

linux nohup're Just using the command unit.


2022-09-22 18:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.