Especialized generator

Boogie El Aceitoso frr149 at
Thu Mar 4 16:03:13 CET 2004

On 4 Mar 2004 06:30:28 -0500, aahz at (Aahz) wrote:

>In article <hltd409mao1mmlk6kn5rjk00i5342p8pk6 at>,
>Boogie El Aceitoso  <frr149 at> wrote:
>>I want to write a generator that specializes on os.walk. It should
>>yield only certain kinds of files.
>>What's the best way of doing this? How do you save the state on the
>>base generator?
>You don't.  You write another generator that yields appropriate results
>from calling os.walk().  Chaining generators is *wonderful*.

I think I got it. And yes, it IS wonderful. :-)

More information about the Python-list mailing list