__pycache__, one more good reason to stck with Python 2?

H₂0.py okopnik at gmail.com
Wed Jan 19 03:30:43 EST 2011


On Jan 18, 4:04 am, Peter Otten <__pete... at web.de> wrote:
>
> What's the advantage of 'find ... | xargs ...' over 'find ... -exec ...'?

Portability. Running the '-exec' version will work fine in a directory
with a relatively small number of files, but will fail on a large one.
'xargs', which is designed to handle exactly that situations, splits
the returned output into chunks that can be handled by 'rm' and such.
'|xargs' is always the preferred option when you don't know how large
the output is going to be.



More information about the Python-list mailing list