[Pythonmac-SIG] Python in Jaguar is where?

Bill Bumgarner bbum@codefab.com
Fri, 18 Oct 2002 13:55:44 -0400


On Friday, October 18, 2002, at 01:32 PM, Walt Ludwick wrote:
>> ...The Fink version works just fine on Jaguar and has for quite some 
>> time.  I had been using it up until recently (I switched to the OS X 
>> installed version of Jaguar because I need to ship standalone apps 
>> that use PyObjC and, as such, didn't want to risk an unnecessary 
>> dependency on the Fink install -- with the readline and ssl support, 
>> the Apple installed Python fits my needs *because I use Python/Cocoa 
>> to do the GUI development*).
>
> (my *emphasis*).  Does this mean that there's a GUI development option 
> for Python - neither Tkinter nor wxPython / PythonCard - and it's in 
> the Jaguar/ Developer Tools installation that i already have, which is 
> supported by Apple?

If you can live with platform specific [OS X only] code, then you can 
use MacPython [Carbon] or PyObjC [Cocoa] to do GUI development using 
Python on the platform.

It isn't supported by Apple, but both work really, really well.

>
> See, the key question for me is:  "What's the best GUI environment for 
> someone just beginning to learn programming in Python (the ideal 
> programming language for beginners, i gather from reliable sources) on 
> Mac OS X?"  Once i get my answer to that question (still open), then 
> the question of how best to build Python in Jaguar, and/or how best to 
> work with the Python contained therein, should answer itself - right?

If you want to learn python, learn python by itself first.  All of the 
GUI programming solutions for Python are additions on top of the 
language.   Build a solid knowledge of the language first, then worry 
about GUI programming later -- it'll go much more smoothly.

If you want to do GUI programming on OS X, I highly recommend going the 
Cocoa route.   Carbon is an awesomely powerful API, but it is extremely 
primitive by comparison [and by purpose -- it solves problems at a 
different granularity].

Like Python, Cocoa is heavily object oriented and, as such, a lot of 
the design patterns, etc, will translate between the two.

Once you have a basic understanding of Python and Cocoa, you can 
combine the two using PyObjC.   PyObjC provides a very light weight 
means of integrating Python and Cocoa....

Alternatively, you could go the Carbon route and use the Python 
bindings to Carbon.

b.bum