Re: [Pyobjc-dev] experiences using pyobjc+pychecker?
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-11-19 21:42:09
|
On Nov 19, 2003, at 4:11 PM, David Eppstein wrote: > Hi, is anyone else using pychecker and pyobjc together successfully? > I just did several things at once: upgrade to 10.3 (and the > command-line > python that comes with it); upgrade to yesterday's cvs version of > PyObjC, and start trying the new pychecker that was just announced > yesterday. When I try pychecker on a very short PyObjC source file, I > get a bus error: > > Hyperbolic% pychecker unicmp.py > Processing unicmp... > /usr/local/bin/pychecker: line 3: 4306 Bus error pychecker probably tries to delete some ObjC-code-containing extension modules from sys.modules, which causes Bad Things To Happen if their ref count goes to 0 and python tries to unload the bundle. pydoc can quite easily cause this problem. Try doing the following at the top of your module: # horrible_hack = ( import sys sys.modules['*' + __name__] = sys.modules[__name__] del sys # ) This will cause your module never to be released/unloaded because there will be the sys.modules['*'+__name__] reference. It shouldn't break anything, because '*' is not a valid character in a python module name. -bob |