How to send Ctrl-C interrupt from Python to C++?

mroytman at my-deja.com mroytman at my-deja.com
Tue Aug 29 14:34:47 EDT 2000


Hi,

I have just started using Python.
I am writing a small Python script wrapper around
my C++ code.
>From Python script I am calling my C++ event
dispatch function which runs recursively forever.
The only way to quit out it is Ctrl-C.
>From what I've read in Python documentation,
Python signal does not interrupt underlying C++
code, it only sets a interrupt handler, meaning
that I cannot just use 'except KeyboardInterrupt'
statement.
Question is, is it possible to pass a interrupt
handler to C/C++ function?
Some sample code would be a great help.
Thanks!

Michael Roytman


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list