Considering getting into Python... Any Pros-Cons?
slinkp23 at yahoo.com
Tue Nov 6 06:33:25 CET 2001
On Mon, 05 Nov 2001 22:09:04 -0800, Cliff Pruitt
<mail at cliffpruitt.com> wrote:
>I guess my main concern what that I'd get into Python and find out
>that I couldn't develop a full application without getting into C++
No need to worry. You can do quite large applications in Python. The
two I use most often are Reportlab (41k lines of python plus 4k lines
of C for speed-intensive parts), Zope (157k lines of python plus 40k
lines of C for speed-intensive parts). Also interesting is Sketch - a
full-featured vector drawing program (43k lines of python plus 22k
lines of c for speed-critical stuff). Remember that these are *large*
projects developed over years. C or C++ projects are often much, MUCH
larger. e.g. Gimp is 540k lines of C, not even counting header files.
You'll notice a pattern here - all of these apps (not Gimp) are
developed in python and have gradually moved the biggest time-wasting
loops into small bits of C code. (Most C files in the above projects
are quite short - anywhere from 50 lines to (rarely) 4k lines).
But don't get the wrong idea - you do *not* need C to do anything
useful in Python. Far from it. All of the applications I mentioned
require fast performance, and have gradually been tuned for
speed. Such optimizations usually should be postponed until the
project is pretty mature (as Zope, Reportlab, and Sketch all are). And
it's VERY important to realize that a slow python program can VERY
often be made "fast enough" without bothering with C. Here's some
optimization tips for pure python - file these away for later:
>Admittedly C++ is probibly a lot more powerful, but this is just a hobby to
>tinker with for me.
You want it to be fun? Then you don't want python - you *need*
> Am I correct in understanding that Python will let you create GUI elements
>(windows, buttons, dialogue boxes, ect...)?
Yes. You have many, many choices here - again, check the FAQ, question
Also worth a look:
>Thanks so much! This seems like a very friendly newsgroup.
We have our moments. :)
More information about the Python-list