While using python\'s cmd.Cmd to create a custom CLI, how do I tell the handler to abort the current line and give me a new prompt?
Here is a minimal example:
I prefer the signal method, but with just pass. Don't really care about prompting the user with anything in my shell environment.
import signal def handler(signum, frame): pass signal.signal(signal.SIGINT, handler)