Useful, robust shell utilities

Donn Cave donn at u.washington.edu
Fri Mar 1 11:51:47 EST 2002


Quoth Jonathan Gardner <jgardn at alumni.washington.edu>:
| 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?

Go ahead.  Then keep an eye out on comp.lang.python, and after some
years pass finally someone will mention it:  "it stinks", they'll
say, with no particular explanation.

| 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

Some of them are essentially POSIX 1003.1 functions, hence supported in
the posix module (which we usually call "os" so it will appear that these
functions are supported on all platforms, whether they really are or not.)

chmod == chmod()
chown == chown()
chgrp == chown()
rm == unlink()
mv == rename()
dd ~= read(), write(), lseek()
df == fstatvfs()

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list