Re: Module written in C does not repond to Ctrl-C interruption.

2006-03-03 Thread fraca7
Bo Peng a écrit : > Dear list, > > I have not done a thorough test, but it occurs to me that > > 1. python code can be interrupted by Ctrl-C. > 2. A C module, if I add a main() function and run independently, can be > interrupted by Ctrl-C. > 3. If I load the C module in python and run, the prog

Re: Module written in C does not repond to Ctrl-C interruption.

2006-02-25 Thread Daniel Dittmar
Bo Peng wrote: > Daniel Dittmar wrote: > >> >> You could set up your own signal handler when entering the C >> extension. This should abort the extension (tricky) and call the >> Python signal handler. > > > This can be done under linux using things in signal.h but I am not > sure whether or n

Re: Module written in C does not repond to Ctrl-C interruption.

2006-02-24 Thread Bo Peng
Daniel Dittmar wrote: > > You could set up your own signal handler when entering the C extension. > This should abort the extension (tricky) and call the Python signal > handler. This can be done under linux using things in signal.h but I am not sure whether or not there is a portable way to do

Re: Module written in C does not repond to Ctrl-C interruption.

2006-02-24 Thread Daniel Dittmar
Diez B. Roggisch wrote: > """ > Although Python signal handlers are called asynchronously as far as the > Python user is concerned, they can only occur between the ``atomic'' > instructions of the Python interpreter. This means that signals arriving > during long calculations implemented purely in

Re: Module written in C does not repond to Ctrl-C interruption.

2006-02-24 Thread Diez B. Roggisch
Bo Peng wrote: > Dear list, > > I have not done a thorough test, but it occurs to me that > > 1. python code can be interrupted by Ctrl-C. > 2. A C module, if I add a main() function and run independently, can be > interrupted by Ctrl-C. > 3. If I load the C module in python and run, the program

Module written in C does not repond to Ctrl-C interruption.

2006-02-24 Thread Bo Peng
Dear list, I have not done a thorough test, but it occurs to me that 1. python code can be interrupted by Ctrl-C. 2. A C module, if I add a main() function and run independently, can be interrupted by Ctrl-C. 3. If I load the C module in python and run, the program will not respond to Ctrl-C in