2
a = input ()

When I run a program in pycharm, I cannot close it with ctrl + c or ctrl + z. When you press the ctrl + c keys, the whole line is simply copied. Windows 10 system

I can't even handle "except KeyboardInterrupt"

when I emulate the launch in the output console, it still does not work ctrl + s, and if I press ctrl + h, it displays "^ Z" in the console

lakvak
  • 27
  • 7
  • 2
    Does this help? [Why doesn't this python keyboard interrupt work? (in pycharm)](https://stackoverflow.com/q/39796689/3890632) – khelwood Dec 15 '20 at 16:44
  • 1
    As shown in the linked question: Check "Emulate Terminal in Output Console" in the run configuration. But in fact, hitting the big red Stop button seems to have the same effect, also triggering a KeyboardInterrupt. – tobias_k Dec 15 '20 at 16:46
  • @tobias_k when I emulate the launch in the output console, it still does not work ctrl + c, and if I press ctrl + z, it displays "^ Z" in the console. I believe this is a Windows 10 console problem, do you have any suggestions how to fix it? – lakvak Dec 15 '20 at 18:44
  • I can not test this with Windows 10 right now. What happens when you hit the big red stop button, does it not send a KeyboardInterrupt like ctrl+c would? About ctrl+z: What should that do? Sending the program to the background does not seem to make much sense in that context. – tobias_k Dec 15 '20 at 18:47
  • @tobias_k ctrl + z should roughly close the program. And when I close the program myself using the red stop button, it does not count as KeyboardInterrupt – lakvak Dec 15 '20 at 18:49
  • Well, it does on Linux, so maybe add a Windows or Windows 10 tag. – tobias_k Dec 15 '20 at 18:54
  • @tobias_k how to add a tag? – lakvak Dec 15 '20 at 19:04

0 Answers0