As Pavel Anosov explains, you want to send Python to CTRL-C to abort it.
But in emacs, the default CTRL-Cis a prefix key.
, , python-mode , CTRL-C ctrl-C . , , CTRL-C CTRL-C comint-interrupt-subjob. (, - META-X comint-interrupt-subjob, .) :
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help(f
... ^C ^C
KeyboardInterrupt
>>>
quoted-insert, CTRL-Q, CTRL-C. , , . :
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help(f
... ^C
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyboardInterrupt
>>>