Python code to replace shell scripts
alan.gauld at btinternet.com
Sat Dec 13 09:47:01 CET 2003
On 12 Dec 2003 20:17:04 GMT, William Park <opengeometry at yahoo.ca>
> > often execution time. Python provides a different approach that is
> > generally better where the solution must be repeated often or where no
> > suitable set of commands already exists.
> That is true, until you learn and program in shell.
Well I've been programming Bourne and Korn shells for about 15
years now. But I still pick python for anything that needs a GUI
or has to run as a daemon or does heavy network calls. I'd also
use Python if I had to write a Web Browser or Word Processor or
In fact anything that needs more than a few hundred lines of
code. Shell is great for what its good at but orders of magnitude
slower and more resource hungry than Python for complex tasks.
Just think about how many processes get launched, the inefficient
text parsing, the nested shells etc. And as for data structure
For sys admin type tasks, Shell is great, for applications its a
Author of the Learn to Program website
More information about the Python-list