On Tue, 8 May 2001, Cory Petkovsek wrote:

> I think this has already been mentioned before, but I'm finding the need 
> to learn a scripting language.  Something more powerful than bash, but
> not as indepth(?) as C.
> 
> I currently know C, C++ and Java.  Can anyone tell me in about a paragraph
> why I should learn perl or python or $your_favorite_scripting_language?
>  I don't need to be sold hard, I just want a few highlights of each
> language, especially how it is related to bash and C or C++ (not java ;(

The argument for python:

It's simple, it's readable, it has interfaces for C,C++,java, ADA,fortran
and who knows what else. It's quick to write and easy to understand and
alter when the need arises, as it always does. It has several different
GUI libraries, support for XML (included as a builtin for>2.0); 
basically it comes with batteries included. 
The WhiteSpace thing hasn't been an issue for me, 
(emacs does the indents, i just type ;-) 
It's got an interactive interpreter which lets you do a sort experimental
programming, trying things out and including them into your program as you
go along.
I like it because i can look at a section of code and get an idea of what
it does fairly quickly. Like this:

#!/usr/bin/python

#functions for making filenames from date/time info

from time import time, localtime, strftime

def calYMDfilename():
        r = strftime('/%Y/%m/%d',localtime(time()))
        return r

def calMDfilename():
        r = strftime('/%m/%d',localtime(time()))
        return r




Reply via email to