It seems that you are on a *nix platform. Ctrl\ generates SIGQUIT
, so this isn't really as much about Python.
If you want to disable the key combination you could use stty
before starting Python:
stty quit undef
Alternatively, use the following to run Python:
stty quit undef; python; stty quit ^\\
which would disable the key mapping before executing python and set it back later.