.pyc files...

Eddie Parker eddie at kickingdragon.com
Sun Nov 14 09:27:47 CET 2004


Hrmm, this is more a *NIX discussion, but I'm curious:

That could be problematic if you have too many .pyc files found - overflow
the command buffer, no?

Something like: "find . -name '*.pyc' | xargs -i rm -f {}", would solve
that, as xargs executes each encountered argument individually, I believe (I
think the -exec command does similar, in Stephen's original post).

Anyways - I've just ran into problems with overflows.. Granted, cygwin, not
a real *NIX. :)

</offtopic -- sorry, but I had to chime in. :)>
 
-e-

-----Original Message-----
From: python-list-bounces+eddie=kickingdragon.com at python.org
[mailto:python-list-bounces+eddie=kickingdragon.com at python.org] On Behalf Of
Simon John
Sent: Sunday, November 14, 2004 1:17 AM
To: python-list at python.org
Subject: Re: .pyc files...

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'`

-- 
http://mail.python.org/mailman/listinfo/python-list


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004
 




More information about the Python-list mailing list