Useful, robust shell utilities

Quinn Dunkan quinn at regurgitate.ugcs.caltech.edu
Fri Mar 1 22:26:13 EST 2002


On Fri, 01 Mar 2002 21:13:15 +0900, Jonathan Gardner
<jgardn at alumni.washington.edu> wrote:
>I tried to use the shutil module... and to tell you the truth, it stinks. 
>Is there an effort to make a robust, useful shutil module that has the 
>equivalent of the unix shell utilities?
>
>I think it would be nice to make things like 'grep' even...
>
>Here is my wish list. Each of these should implement a significant portion 
>of what the GNU utils do. They should be robust, and give reasonable 
>results, and reasonable exceptions.
>
>touch, chmod, chown, chgrp, touch
>df, du
>cp, dd, install, mv, rm, shred

I have a single function that implements more than a sigificant portion:
os.system()

Seriously, why reinvent all those wheels?  If you're looking for portability to
systems without them, I'm sure you can find implementations.  Maybe not on the
Mac though--I don't know how shellish stuff works there.  If the answer is "it
doesn't" then maybe a python solution is necessary.  But all most of the chgrp
etc. stuff isn't going to work there anyway.

>If there isn't an effort to make this, or if no one has done anything like 
>this yet, I am willing to volunteer some time to do it. It would be really 
>nice if they ended up being compatible with Windows and Macintosh - give 
>them some powerful tools they didn't even know existed!

The cygwin people already did this.

If you want to do some hacking that's great, but your time may be better
spent elsewhere :)



More information about the Python-list mailing list