0

I have a Python Script, running in command line. In some machines ( maybe Linux, I don't know), I can terminate the service by typing CTRL+C. However, I can't do this in my Windows XP machine.

Is there any Python script terminator that I can try on?

Graviton
  • 2,865
  • 12
  • 42
  • 64

3 Answers3

3

I found the answer.

The command to break a Python script, on a Windows XP machine, is

CTRL+Pause Break
Graviton
  • 2,865
  • 12
  • 42
  • 64
1

If it's a script executing in CMD.EXE or COMMAND.COM, <Ctrl>-<C> will terminate it. It sounds to me like you're running a console-mode application (an EXE), in which case it's very likely that there isn't a keyboard termination character. It'll just depend on what the author of the application coded in.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
0

Could you use the Task Manager to kill the process manually? I'm not sure if you can do that as a batch job (i.e. for large numbers of processes automatically), but you shouldn't really be killing large numbers of processes automatically, and in any case Task Manager is no less efficient than Ctrl+C.

David Z
  • 5,475
  • 2
  • 25
  • 22