How to stop/terminate a python script from running?

后端 未结 16 1776
-上瘾入骨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:48

    • To stop a python script just press Ctrl + C.
    • Inside a script with exit(), you can do it.
    • You can do it in an interactive script with just exit.
    • You can use pkill -f name-of-the-python-script.

提交回复
热议问题