Has anyone successfully created the PyObjC app in Snow Leopard?

If you did this, could you please share how you installed pyobjc? I tried to do this by installing PythonMac 2.5 (for a separate package through py2app) and running easy_installPyObjC. I always get those deprecatederrors, especially those that are declared in dyld.h, and inside objc_inject.m.

I tried compiling from the source, but still no luck.

In addition, when I run my PyObjC application, folded by Leopard under Snow Leopard, it has errors regarding PyObjC, for the first time it could not be seen Foundationor AppKit, the second was typestrunknown.

Thank you and rate your answers.

+5
source share
2 answers

I already found a way ... although I do not know if this is official or what ...

I downloaded the 2.5 version of PythonMac, installed it, and then added a symlink to the installation directory, for example:

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python /Library/Frameworks/Python.framework/Versions/2.5/lib/site-python

This part showed that the combined PyObjC binaries are part of the PythonMac installation, and when I do easy_install, the system package sites will not be affected. It is also worth noting that you should not conflict with the py2app system package using easy_install-ing py2app, otherwise you will encounter a typical error.

I want to know if something is wrong with this for me to be able to make a separate PyObjC application under Snow Leopard.

0
source

XCode ( Snow Leopard), PyObjC. :

$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Foundation
>>> Foundation.NSString.stringWithString_(u'hello PyObjC')
u'hello PyObjC'
>>> 

Foundation, AppKit, ScriptingBridge, .

+4

All Articles