On Sun, Nov 23, 2008 at 3:49 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Hi,
>
> does anyone have a simple script/example how to handle the _sig_on and
> _sig_off that is in Sage (e.g. so that I can use ctrl-C to interrupt a
> code written in C)?
>
> I tried to port it to my own project, but I am getting some missing symbols:
>
> http://github.com/certik/hermes2d/commits/sig/
>
> everything compiles nicely into an .so file, but when importing in
> python, I get:
>
> ImportError: /home/ondra/repos/hermes2d/python/hermes2d.so: undefined
> symbol: _signals
>
> So I think I need to link it with something. If someone knows, let me
> know. If not, no problem, I think I'll figure it out eventually.
>

The extra code is in Sage's c_lib, I think. See

SAGE_ROOT/devel/sage/c_lib/src/interrupt.c
SAGE_ROOT/devel/sage/c_lib/include/interrupt.h

Ask on sage-devel if you don't get enough feedback here, though I think it would
possibly be very good to port this signal stuff into Cython itself (why not?).

I've cc'd Gonzalo Tornaria (<[EMAIL PROTECTED]>) since he co-authored
the signals stuff with me.

William

> Ondrej
>

> P.S. I also tried the approach that is in numpy, see the patch before it:
>
> http://github.com/certik/hermes2d/commit/2ca243da2bda18fefe8a6a1c24e922e6361779a6
>
> but that gives me segfaults when run from Python. Also haven't yet
> figured out why.
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to