leftover pyc files

Peter Otten __peter__ at web.de
Thu Nov 3 06:51:48 EDT 2011


Jonathan Hartley wrote:

> A task like this is more suited to bash than Python:
> 
> find . -name '*.pyc' -exec rm '{}' ';'

You forgot to exclude the .svn directory from the search and didn't limit 
the deletion to pyc-files whose corresponding py-file doesn't exist.

How would your line look with these modifications?




More information about the Python-list mailing list