How to stop/terminate a python script from running?

后端 未结 16 1786
-上瘾入骨i
-上瘾入骨i 2020-12-02 13:46

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?

16条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 14:45

    exit() will kill the Kernel if you're in Jupyter Notebook so it's not a good idea. raise command will stop the program.

提交回复
热议问题