0

hey guys,
Got another question:
in C programming etc we can stop an execution of say an infinite look by pressing Ctrl+C.
What's the equivalent in python? i'm using the IDLE GUI. I've found myself in situations where its running a never ending long task which i want to stall, but i just dont know how, and it ends up with my python crashing or having to restart it...

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by jlm699
0

In idle you can restart the shell in the shell menu. Normally, this kills your execution because idle starts a new process.

0

In idle you can restart the shell in the shell menu. Normally, this kills your execution because idle starts a new process.

Yeah I tried that a couple of times, but there were some instances where even the *.py file too had to be close (in the task manager) and IDLE has to be restarted completely, so was wondering if there was any other way that i didnt know of.
But yeah, closing the shell does help most of the time.

0

You can stop using IDLE and just run your code in the console, which retains the usage of Ctrl+C (I believe that IDLE tries to catch Ctrl+C)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.