Is there a quick way of deleting all the .pyc files from a tree of directories?
If you've got GNU find then you probably want
If you need something portable then you're better off with
If speed is a big deal and you've got GNU find and GNU xargs then
This is unlikely to give you that much of a speed up however, due to the fact that you'll mostly be waiting on I/O.
cd to the start of the tree of directories then:
find . -name '*.pyc' |xargs rm -f