Does Python seem appropriate for me?

Courageous jkraska1 at san.rr.com
Sun Apr 22 10:36:49 EDT 2001


>the littlest things will drive you mad.  Trivial example:  say you use
>
>    dir/s *.py
>
>today to find all the .py files in the subtree rooted at the current
>directory.  You're not going to *believe* the hoops you have to jump through
>to get that done under a Unix shell instead.

Find all .py files in the subtree at the current directory:

% find . -name "*.py" -print

Find all .py files in the subtree at the current directory,
which also contain the word "import":

% find . -name "*.py" -exec grep import {} \; -print

C//




More information about the Python-list mailing list