Problem Running Cocoa/Python Programs

Hi,

I've just started to try to code Cocoa applications with XCode and Interface Builder using PyObjC, however I have been getting a lot of import/naming errors. The most recent is "NameError: name 'AppHelper' not defined" when I try to use the decorator @AppHelper.endSheetMethod. I tried to remedy this with "from AppHelper import endSheetMethod", but it has an import error with AppHelper. The autocomplete when inputting the decorator still works, and I am not having problems with any of the other modules I am importing, mainly objc, Foundation, and AppKit, nor am I having problems with other -- albeit simpler -- decorators such as @IBAction.

I read that the problems with importing could be caused by the fact that I have MacPython 2.6 installed, as well as several other Python libraries (Numpy, SciPi, etc). Apparently installing anything other than the base installation (and sometimes other than just the Mac OS X provided Python version) can cause (but does not necessarily mandate) problems in Python.framework.

If anyone could provide some insight on this I would be grateful... Thanks!

MacBook, Mac OS X (10.5.5)

Posted on Nov 6, 2008 10:28 AM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Problem Running Cocoa/Python Programs

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.