.pyc files...

Mike Meyer mwm at mired.org
Tue Nov 16 22:02:15 CET 2004

Jorgen Grahn <jgrahn-nntq at algonet.se> writes:

> On Sun, 14 Nov 2004 16:48:51 -0600, Mike Meyer <mwm at mired.org> wrote:
>> "Simon John" <simoninusa2001 at yahoo.co.uk> writes:
>>> Stephen Waterbury wrote:
>>>> > OK, stupid question, but it's been bothering me for ages.. J
>>>> >
>>>> > I love Python to bits, but .pyc files always litter my source tree,
>>> and
>>>> > they've always bothered me. ...
>>>> One solution (on unices, at least):
>>>> alias cleanpy="find . -name '*.pyc' -exec rm {} ';'"
>>> or with backticks:  rm -rf `find . -name '*.pyc'`
>> Better with $(: rm -rf $(find . -name '*.pyc').
> Yeah, but then you're bash-specific.  Or at least that rules sh, csh and
> tcsh.

As has already been stated on the list, $() is POSIX. So sh has it. So
does zsh. If you're scripting in csh or tcsh, you're making a
fundamental mistake. The references for that have also already been
posted in this thread.

Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list