[Pythonmac-SIG] Python development on OSX

Bill Janssen janssen at parc.com
Fri Jan 21 03:15:03 CET 2011

Adam Morris <amorris at mistermorris.com> wrote:

> >By the way, Python is more than "just another good scripting
> >language". I build large systems with it.  I do (rarely) write Mac
> >"applications" with Python.  I use Xcode and Cocoa-Python, and
> >IMO it works great.  Is that using py2app "under the covers"?  This
> >is another reason not to install a non-system Python; it sometimes
> >screws up apps built using Xcode and Python.
> I'm trying really hard to unpack this.

I tend to build command-line tools and services.  But when I need to
build something with a Mac UI I pull up Xcode and use the Cocoa-Python
template.  Works like a charm -- but I believe it depends on the system
Python.  By the way, if you need to do this, take a look at Hillegass'
book, COCOA PROGRAMMING FOR MAC OS X.  And read Will Larson's great
series, starting with


> I can't use XCode and the py-objc bridge with my "installed" python
> 2.7 setup? (Installed isn't quite the right word, I know.)

Don't know, because I always use the "system" Python for non-Python-dev
coding.  But I'm betting there are some dependencies in Xcode or the
Xcode templates which require the system Python.

> Why not? I guess it's because something is hard-coded somewhere ...

Sure.  But anything hard-coded can be overridden.  The sources are just
sitting there...

> I don't particularly "need" XCode but I really want to understand this.

Unless you're developing just for the Mac, I'd suggest using PyGUI or
wxPython or PyGTK or some such, and build applications (small 'a') with
that, instead of Cocoa.

That experience will port out of the Mac to other Unices and Windows.


More information about the Pythonmac-SIG mailing list