[sage-support] Re: problem with sig_on() and sig_off()
That's because you need to explicitly import/define sig_on and sig_off. I guess that this is done automatically when the extension is .spyx. In the file sage/graphs/cliquer.pyx it is done with the line : include sage/ext/interrupt.pxi Nathann On Sunday, August 17, 2014 10:11:48 PM UTC+2, Paul Mercat wrote: Hi ! I have writed some C code that I've integrated to sage using a .spyx file, and it work well. But when I put it in the sage source code and replace the .spyx extension by .pyx, the functions sig_on() and sig_off() doesn't work anymore (if I avoid them, it works well). I get the following error : {{{ sage/combinat/words/cautomata.pyx:364:14: undeclared name not builtin: sig_on }}} Do you know why there is this error and how to fix it ? Thanks, Paul -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: problem with sig_on() and sig_off()
Thank you very much, it works ! Paul Le dimanche 17 août 2014 22:46:17 UTC+2, Nathann Cohen a écrit : That's because you need to explicitly import/define sig_on and sig_off. I guess that this is done automatically when the extension is .spyx. In the file sage/graphs/cliquer.pyx it is done with the line : include sage/ext/interrupt.pxi Nathann On Sunday, August 17, 2014 10:11:48 PM UTC+2, Paul Mercat wrote: Hi ! I have writed some C code that I've integrated to sage using a .spyx file, and it work well. But when I put it in the sage source code and replace the .spyx extension by .pyx, the functions sig_on() and sig_off() doesn't work anymore (if I avoid them, it works well). I get the following error : {{{ sage/combinat/words/cautomata.pyx:364:14: undeclared name not builtin: sig_on }}} Do you know why there is this error and how to fix it ? Thanks, Paul -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.