How do you end a Python shell in a Wing IDE?

I am new to Python and use the Wing IDE to play with functions. One of the things I could find while browsing was how to forcefully terminate the Python shell while executing a command that will not be terminated any time soon. An example is:

import math
math.factorial(1000000)

I know in Visual Studio C ++, the Ctrl + C command, but what is the Python equivalent?

+5
source share
2 answers

The method used to complete the execution differs between shells. For the Wing IDE, you use the Restart Shell in the Options menu.

+3
source

It depends on your shell. For most shells, this is ctrl-C or a process kill.

It is not possible to do this from inside python (unless you create threads or processes) because this thread is stuck.

0
source

All Articles