fork and thread and signal... oooooops

Jonathan Gardner jgardn at alumni.washington.edu
Thu Mar 7 06:46:14 EST 2002


Gerhard Häring scribbled with his keyboard:
> Le 06/03/02 à 23:41, Jonathan Gardner écrivit:
>> [...]
>> Your init.d script will be written in sh, not python. It would be a
>> horrible idea to write an init.d script in python.
> 
> I can't see why writing an init script in Python would be a bad idea.
> Care to explain?
> 

Let me put it another way. What language would you choose to write a 
program that works with a lot of text? You'd probably choose perl to do 
that because perl makes it really easy to work with text and such. What if 
you just wanted to do a simple substition? You'd go with awk, because that 
is what awk is good for. 

Shell is really good for writing things like init scripts. All the other 
init scripts are written with shell. Python just doesn't compare to shell 
when all you want to do is start or stop or send signals to a process. 
That's what shell was built for. Writing an init script in Python makes 
about as much sense as writing your init script in Tcl or C++.

And think of the sysadmins...

Jonathan



More information about the Python-list mailing list