[Pyrex] while loop not detecting ctrl-c
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Nov 26 02:17:13 CET 2003
Bryan Weingarten <bryan.weingarten at pobox.com>:
> i'm not sure i'm understanding what you mean by a default callback. i
> thought this was what you meant, but it didn't work.
The default callback probably has to be an interpreted Python
function, not a Pyrex function. The reason is that it's the
interpreter loop which checks for the flag set by the ctrl-C handler
and raises a Python exception.
You may have to create an auxiliary Python module containing a
do-nothing function and import that into the Pyrex module. Not very
elegant, but it's the best I can think of at the moment without
delving into the internals of things.
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Pyrex
mailing list