Emlingur
Emlingur

Reputation: 163

Prevent curses from using ctrl + c

Curses keeps closing my program every time I do a CTRL + c, how do I prevent that from happening? I tried disabling the keypad, going into raw and noraw mode, but it keeps happening.

Upvotes: 1

Views: 1776

Answers (1)

Steven Whaley
Steven Whaley

Reputation: 109

The program needs to handle the signal SIGINT. You can research Signal Handling in python and reference this related question: How do I capture SIGINT in Python?

Upvotes: 3

Related Questions