[Pyobjc-dev] experiences using pyobjc+pychecker?
Brought to you by:
ronaldoussoren
From: David E. <epp...@ic...> - 2003-11-19 21:11:19
|
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 /usr/bin/python /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/si te-packages/pychecker/checker.py "$@" Hyperbolic% cat unicmp.py """unicmp.py More intelligent collation ordering for unicode strings. Requires Mac OS X and PyObjC. Designed to be a plug-in replacement for the usual cmp function. D. Eppstein, October 2003. """ from Foundation import NSString def unicmp(u1,u2): if not isinstance(u1,(str,unicode)) or not isinstance(u2,(str,unicode)): return cmp(u1,u2) return NSString.localizedCaseInsensitiveCompare_(u1,u2) or cmp(u1.lower(),u2.lower()) I am unsure whether this indicates something wrong with my code (I doubt it since it's so short), a problem with PyObjC, a problem with pychecker, or what. PyObjC appears to be functioning normally when I actually run it, and pychecker appears to be functioning normally when I try it on non-PyObjC-based code. Neal Norwitz, pychecker's maintainer, writes: > There's no way Python should crash when running pychecker. pychecker > has no C modules. > > Pychecker may have a bug too, but that can't be determined until the > interpreter doesn't crash. > > It's possible that there is a double free in the extension module(s). > This was a problem in wxWindows a long time ago. Since pychecker > does the imports differently, the bug isn't usually found. -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science |