I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program?
You can also do it if you use the exit()
function in your code. More ideally, you can do sys.exit()
. sys.exit()
which might terminate Python even if you are running things in parallel through the multiprocessing
package.
Note: In order to use the sys.exit()
, you must import it: import sys