How to stop/terminate a python script from running?

Ferry's picture

Offline

Joined: Sep 20, 2018

Replies: 8
How to stop/terminate a python script from running?
July 12, 2019 - 6:28pm

hi guys. i am running a python code on raspberry pi3. Everything is running well but only thing which is annoying me is the continuous running of the python program. for exiting from the python program i need to close the terminal window and open terminal again then locate to the folder and run the python program again. i know this cannot be the right way to do this and it is time consuming. what to do if i want to terminate the program withtin single terminal window. 

Munna Pandit's picture

Offline

Joined: Jan 21, 2019

Replies: 42
How to stop/terminate a python script from running?
July 12, 2019 - 6:31pm

hey it is very easy to terminate within the terminal. Just use a command "Ctrl + C" to exit from the program and you are done. you dont need to close the terminal window again and again. 

Ferry's picture

Offline

Joined: Sep 20, 2018

Replies: 8
How to stop/terminate a python script from running?
July 12, 2019 - 6:41pm

yeah. it worked. thanks. it solved the problem