[Python] Catch Visual Studio Code Kill in Python

Discussão em 'Python' iniciado por Stack, Março 13, 2025.

  1. Stack

    Stack Membro Participativo

    How can you catch the terminal kill command (trash can) in Visual Studio Code when using Python?

    When you click the trash can, does it send a KeyboardInterrupt which could be caught in a try/except statement? The reason I ask is that I want to catch this and use it to exit the code gracefully.

    Continue reading...

Compartilhe esta Página