Re: Pyrex Digest, Vol 55, Issue 3
Kenny MacDermid <[email protected]> Tue, 21 Jul 2009 17:05:39 -0400
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
On 21-Jul-09, at 9:46 AM, Claudio Freire wrote: > Answers inline: > >> I'd like to know if there's any way to import a pyrex module and = >> still have the python interactive interpreter handle errors as = >> before. >> >> For example, normally if I type: >> >>>>> abc >> >> I get a standard NameError, and then another '>>>' line >> >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> NameError: name 'abc' is not defined >>>>> > > It always behaved like that for me > >> ...but if I first import a pyrex module then I get the same = >> traceback, but then no '>>>' line. Python just quits. > > That would suggest a segmentation fault in your pyrex module. Thank you for your reply. It didn't turn out to be that, but knowing = it wasn't pyrex I found what actually caused it. Somewhere down the import path a fellow dev had overridden = sys.excepthook to add custom logging, and put sys.exit() at the end. I should have tried it on a simple case first, but someone told me = that's just the way pyrex works, and it sounded logically enough that = recovery from C land would be impossible. Thanks again, Kenny