I have written a code in Python to open a website in infinite loop, also I made it to Pythonw (without console). I want to stop it without powering off my computer, is there any way to do it?
Asked
Active
Viewed 92 times
2
-
Kill the process in the task manager – avocadoLambda May 28 '20 at 06:27
-
If you are on windows you can kill the process using Task Manager. Ctrl+Alt+Escape on the keyboard will open the Tadk Manager, then find the python process, right click and press Stop/End/Terminate (not sure what the name is) – NewPythonUser May 28 '20 at 06:27
1 Answers
0
From your script, you can use the sys module, for example with the
sys.exit()
command. You could also use exponential back-off, by adding an increasing sleep-step within a try block, if you need to retry opening the URL.

Gustav Rasmussen
- 3,720
- 4
- 23
- 53