0

how to make program stop

22nd Oct 2016, 1:21 PM
william109k
william109k - avatar
5 Respuestas
+ 3
Ctrl-C is 'break/interrupt' : use for infinite loops or long calculations. Ctrl-D is 'end of transmission / stream' . Use to exit some types of input, allowing a previous Ctrl-C to immediately take effect when it's being ignored. sys.exit() - as long as the program reaches it - not for infinite loops you'd have to 'break' to exit. Ctrl-Z : (not Windows) - pause process into background, displays interactive shell. View with 'jobs'. Terminate if necessary. kill / task manager - used externally to terminate when necessary.
23rd Oct 2016, 12:34 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
Ctlr+C
22nd Oct 2016, 3:26 PM
Rohit Kumar
0
You can do this with sys.exit() import sys sys.exit("Exit message")
22nd Oct 2016, 1:46 PM
Luk4s Apps
0
input("Enter any Key to exit")
22nd Oct 2016, 2:23 PM
AMRIT SAHANI
0
use the exit function eg. exit()
23rd Oct 2016, 2:58 PM
Mukul Ahlawat
Mukul Ahlawat - avatar