Useful, robust shell utilities

Michael Hudson mwh at python.net
Sun Mar 3 11:53:50 EST 2002


Jonathan Gardner <jgardn at alumni.washington.edu> writes:

> I tried to use the shutil module... and to tell you the truth, it
> stinks.

Yep.

> Is there an effort to make a robust, useful shutil module that has
> the equivalent of the unix shell utilities?

Not that I know of.  distutils.file_utils does a better job of some
things.

Writing "shutil2.py" has been on my todo list for months, at least.
It would be nice to make it as portable as possible.

> I think it would be nice to make things like 'grep' even...

That's going waaay beyond what I had in mind.

> 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

These are in os, or easy to fake.

> df, du

I'm not sure these are really worth the effort.  Implementable in
python using os functions.

> cp, dd, install, mv, rm, shred

Now this is what I was talking about.

> 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.

That would be good.  My time is pretty much all volunteered.

> 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 one philosophy I'd managed to come up with was "ask the OS to do
as much as possible".

I think a good first step would be to post an interface sketch.

Cheers,
M.

-- 
  Remember - if all you have is an axe, every problem looks 
  like hours of fun.                                        -- Frossie
               -- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html



More information about the Python-list mailing list