Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

FluJunkie

macrumors 6502a
Original poster
Jul 17, 2007
618
1
Does the newest XCode support Python natively? The weird PyObjC workarounds and the like that exist online never worked out for me - I suspect because I wasn't using the built-in Python install at that point (I prefer the Enthought distribution).

Or is it still...a bit more trouble than it's worth?
 

larkost

macrumors 6502a
Oct 13, 2007
534
1
If you are not using the built-in Python, then the chances of PyObjC working are just about nil (python has to be modified to support the bridges, third party distributions do not have these modifications).

And Apple has not been including the PyObjC templates for a while now. I suspect that simply installing them from the PyObjC project page will get you back and running there. I don't suspect that any of XCode's nice new editing features (such as class lookup) are going to work, since Clang does not understand python.
 
If you are not using the built-in Python, then the chances of PyObjC working are just about nil (python has to be modified to support the bridges, third party distributions do not have these modifications).

PyObjC works fine with MacPorts python (port install py26-pyobjc, or whichever version of Python you are using). Not all the frameworks are on MacPorts but you can then easy-install-2.x from this list quite happily

http://pypi.python.org/pypi?:action=search&term=pyobjc&submit=search

Code:
HostName:~ username$ python
Python 2.6.6 (r266:84292, Jan 30 2011, 01:41:50) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Foundation 
>>> import AppKit
>>> import WebKit
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.