开发者

Extension Crashing Python on Import?

I have a python extension that is built and installed through distutils (using mingw on windows). However on import of this module the interpreter crashes. Is there anyway to debug and figure out why it crashes?

I did look around online and couldn't find anything specific, or any examples.

EDIT

Sorry i am trying 开发者_开发技巧to compile for python 2.5.4 (we need 2.5.4, since we use arcgis geoprocessor library):

http://effbot.org/media/downloads/ftpparse-1.1-20021124.zip

On windows, i define crash as: "Python.exe has encountered a problem and needs to close"

I'll try debugging with GDB

EDIT 2 For what ever reason, doing a

setup.py clean

For the package and doing:

setup.py install

fixed all the problems. :psyduck:


Simply running the following may give you a clue about what call is causing the issue without having to break out a debugger. But if you just get a silent crash you're going to have to put on your detective hat as per Xavier's answer.

strace python -v -c "import faultylib"


I suppose using gdb see http://oldwiki.mingw.org/index.php/gdb

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜