Find in ipython3

Cecil Westerhof Cecil at decebal.nl
Sat Jun 6 06:10:14 EDT 2015


On Friday  5 Jun 2015 01:04 CEST, Cameron Simpson wrote:

> On 04Jun2015 13:09, Michael Torrie <torriem at gmail.com> wrote:
>> Why not use Python for what it's good for and say pipe the results
>> of find into your python script? Reinventing find poorly isn't
>> going to buy you anything.
>
> And several others made similar disparaging remarks. I think you're
> all missing some of the point of Cecil's approach.

My first experience with this newsgroup was very positive. Lately I
found some remarks not really encouraging (to use a British way of
talking). I am glad with this remark.


> I suspect Cecil is a bit like me; he's writing various well
> understood simple external tools in Python as an aid to learning
> Python and its toolbox. As an added bonus one gets a deeper
> understanding of the nuances of the external tools as well, by
> debugging issues in implementing them.

Yes, this is part of what I am doing: learning to work with Python.

But it is more. If I use shell functions like:
    !find ~ -iname '*python*.pdf'
then I have to switch between different way of working. Now I can use:
    find('~', '.*python.*.pdf', True)
so I do not have to switch my thinking.

And I can use:
    results = find('~', '.*python.*.pdf', True)
to do something with it.

At the moment the problem is that my Python variant takes 5 times as
much time as the shell version. Not a real big problem, but something
to think about.

And as someone said: this will also work in Windows. No plus for me,
but maybe for someone else.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list