Beliavsky, 20.05.2011 18:39:
Since everyone seems to be hot flaming at their pet languages in this
thread, let me quickly say this:
Thanks for sharing the link.
Stefan
I kind of thought that other posters might also chime in on why they
chose Python instead of <insert other language here>. Since no one else
has, I'll bite.
I've been programming for about seven years, and am basically
self-taught. I got my first taste of writing code when trying do to some
basic hacking on my (then) shiny new G3 iBook. (Even though it was a
Mac, I was enthralled by its Unix underpinnings.) C was too hard for a
programming newbie, and (at the time) I only understood shell to be a
sequential series of commands. (cd ~/.Trash; ls; rm *)
My goal was to write desktop GUI apps, and looking around at the
available languages, libraries, and toolkits for Unix and the Mac, I
settled on Tk as the UI toolkit, since it seemed to be the simplest one
out there, and on Tcl and Python as the programming languages. (A brief
detour with AppleScript convinced me that it is a useful scripting
language for hooking into various parts of OS X, but it is not very
powerful.)
While Tcl doesn't get a lot of love or respect on this list, it is quite
powerful in its way, and an understanding of Tcl is quite useful in
particular for understanding Tk and its Python wrapper, Tkinter. After
becoming productive with Tcl and writing a couple of applications in it,
I turned to Python in earnest and set about learning its capabilities as
well, and have since released a couple of Python desktop apps on the Mac
(commercial apps, using Tk as the toolkit).
With that background, here are my reasons for keeping Python in my toolbox:
1. Its core libraries and third-party packages address nearly every
imaginable need. The size of its community is a real asset here. Tcl is
a more compact language, with a smaller core library and fewer
third-party packages (no library comparable to Mark Pilgrim's
feedparser, for instance), which means that for some use cases, using
Tcl would mean more work.
2. Python has excellent tools for deployment of desktop apps. Since I
only work on the Mac, I'm not that familiar with py2exe, but py2app and
bundlebuilder have always allowed me to wrap up my apps with an embedded
Python interpreter with a minimum of fuss. Tcl also excels in deployment
of desktop apps; other languages, such as Perl and Ruby, seem to lag
behind in this respect. (I could find no actively-maintained,
open-source, Mac-viable desktop app bundling tools for either Ruby or
Perl, which cooled my interest in them considerably.)
3. Python's binding to Tk makes writing GUI apps a straightforward
process. Since I already knew Tk quite well, learning its Python
bindings was much simpler than learning another GUI toolkit such as PyQt
or wxPython. The strategies I learned from Tcl to develop sophisticated
Tk-based UI's translate quite well to Python.
Python isn't perfect; for some instances, I find Tcl a more lightweight
and accessible tool to use. I also spend a lot of time digging into Tcl
and Tk's C API to extend their capabilities in certain ways; this also
allows my Python apps to access such enhancements, via Tkinter. But all
in all I'm a happy user of Python, and it will continue to have a
primary place in my toolbox.
--Kevin