Looking for os.listdir() generator

Nick Craig-Wood nick at craig-wood.com
Fri Jul 24 09:29:57 CEST 2009


Christian Heimes <lists at cheimes.de> wrote:
>  Nick Craig-Wood wrote:
> > Christian Heimes <lists at cheimes.de> wrote:
> >>  I'm looking for a generator version of os.listdir() for Python 2.5 and
> >>  newer. I know somebody has worked on it because I've seen a generator
> >>  version in a posting on some list or blog a while ago. I can't find it
> >>  anymore. It seems my Google fu is lacking today. All I can find is a
> >>  very old version of xlistdir. A Cython based solution is appreciated but
> >>  please no ctypes version.
> > 
> > I posted exactly that yesterday I think ;-)
> > 
> > Note that this has a python part as well as a ctypes part because the
> > version of ctypes I used doesn't support generators.  I think the
> > development version does though.
> 
>  Thanks Nick!
> 
>  ctypes? I'm sure you wanted to say Cython :)

Er, yes!

>  If you don't mind I'm going to wrap it up into a nice package and
>  release it on PyPI.

Yes thats fine with me!

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list