Is any python like linux shell?

Jorgen Grahn grahn+nntp at snipabacken.dyndns.org
Mon Jan 22 15:46:23 EST 2007


On Sun, 21 Jan 2007 22:10:17 -0800, James Stroud <jstroud at mbi.ucla.edu> wrote:
> Frank Potter wrote:
>> I learned some python in windows.
>> And now I've turned to linux.
>> I read a book and it teaches how to write shell script with bash,
>> but I don't feel like the grammar of bash.
...

> My strongest advice would be to let go of the idea of "shell scripting" 
> altogether and begin to write programs built from libraries to solve 
> your problems.

Shell scripting is "building from libraries". In this case, other
executables are the libraries.

> The mere act of beginning to write a shell script (in, 
> say, bash) will tie you to that "language",

In what way is shell scripting different from Python scripting here?

> even when you realize your 
> task was much more complex than you had originally imagined. It has 
> happened to me time and time again.

Opinions differ, of course.

Me, I don't hesitate to write Bourne shell scripts when that seems like the
straightforward idea. Then it's my responsibility to move to something else
-- usually Python -- if the problem grows out of its language. (And I have
to admit, I don't let it grow very complex before I make that choice,
because I don't known Bourne shell that well.)

/Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.dyndns.org>  R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list