[Pythonmac-SIG] Python for OSX programming beginner?

Kevin Ollivier kevino@tulane.edu
Mon, 24 Mar 2003 09:51:21 -0800


On Sunday, March 23, 2003, at 02:31  PM, Craig Morris wrote:

> Hi all,
>
> Been lurking here for a while and quietly observing.
>
> I am looking for a programming language and preferably and IDE for a 
> young nephew wanting to dip his toes in the programming pool (he is 
> running OSX). I can help him with C or probably Java  as I have short 
> history in C. However he finds C a little heavy going and really 
> enjoyed REALbasic for the demo period, but its a bit expensive to buy 
> for a school kid who may not choose to go very far with it. The 
> bundled ProjectBuilder and InterfaceBuilder stuff with Apple's OSX  I 
> just love, and its free ( the best gcc has ever looked), but he gets 
> lost with the connections and the language and it would be enough to 
> put him off for good.
>
> Is Python worth further investigating and how good are the IDEs?

MacPython has it's own IDE program you can use. I've found it easy 
enough, and there are several others out there, although I leave it to 
others to point out which do and don't work on OS X.

> Is there something along the lines of REALbasic VisualBasic integrated 
> interface/code style IDE available?

I'm not sure if there is anything that simple available. Part of the 
reason is that there are several GUI tools available for Python. There 
are cross-platform tools like Tkinter and wxPython (which I personally 
use), and there is also platform-specific tools. MacPython, for 
example, provides wrappers for many of Apple's GUI components.

There is, I know, a GUI builder tool for wxPython (and it's C++ parent 
wxWindows) called wxDesigner. You can find it at: 
http://www.roebling.de/

> What are the specialities limits of the language?

Practically, not much. C++ developers can write extensions for Python, 
so if there is something you can't do in pure Python, chances are 
someone's written a module for it and generated a Python wrapper for 
it. (For example, wxPython is a wrapper for wxWindows.) Speed is slower 
than C/C++, but not by much, and the ease of development and amount of 
included modules make up for it, IMHO.

I've found it to be more powerful than Visual Basic, and less complex 
than C/C++/Java. I've been using Python for nearly two years and now I 
don't work in any other language unless I have to. =)

> Why learn Python rather than battle on and master C or more 
> particularly Objective C ?

Python helps developers generate code that is less buggy and more 
readable.  It's also an excellent language for teaching people the 
concepts of programming, because the data types are abstract and 
flexible, and work intuitively. Some people call Python "executable 
pseudocode", and I tend to agree. =) It is very hard to learn how to 
program when a small mistake can cause your program not to run and 
require you to spend hours debugging.

If your nephew later decides to move onto C and Objective C, at the 
least he'll have a solid understanding of the core aspects of 
programming, and will be better prepared to handle more powerful 
languages.

> Rather difficult to answer, but how different is the learning curve?

It's hard to say how different the learning curve is, but here's a 
statistic for you. I've got a "Learn to Program Using Python" book (by 
Alan Gauld), that is roughly 260 pages, and covers everything from the 
basics of the language (variables, data types, etc.) all the way up to 
object oriented programming, debugging, regular expressions, and GUI 
programming.

My first C++ class included an 800 page book that got me through 
variables, basic input and output, and functions. Another 800 page book 
followed which introduced object-oriented programming, and neither of 
them touched GUI programming, etc.

That's about 1300 pages more for C++, and they haven't even covered 
most of the skills students need to survive in real-world programming 
jobs. The learning curve to become productive in Python could probably 
be measured in weeks or months, but C/C++ it is measured in years.

Good luck!

Kevin