Python advocacy

Blake Winton bwinton at
Fri Mar 24 00:22:48 CET 2000

On 02 Mar 2000 18:19:57 -0500, Andrew M. Kuchling wrote:
>Even the Python tutorial bears traces of this, with the very first paragraph
>giving a motivating use for Python: translate a really complicated shell
>script into Python for more maintainability.  I can't remember the last time I
>started out by writing a shell script for some task,

I can.  It was just the other day, and I wanted to rename a bunch
of files and directories from "FOO/BAR/BAZ.HTML" to "foo/bar/baz.html".
It turned out to be far harder than I would have hoped.  Not a
one-liner, anyways.  I would have used Python, but it's been a
while since I've used the os.path and listdir functions, and I
wasn't in a mood to look them up.

As it turns out, there were also some files which should have
been "foo/bar/", so I had some manual renaming to do
after all.  If I had been using Python, I would have been sorely
tempted to scan the html files as I was processing them, and
change the case of the files to whatever the html expected.  So
in this case, not using Python actually saved me time...  ;)

4:20pm up 23 days, 19:12, 1 user, load average: 1.00, 1.00, 1.00

More information about the Python-list mailing list