file find module

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Fri Sep 28 00:04:04 EDT 2001


Use os.listdir() and write your own matching function if the dotfiles
become a problem.

----- Original Message -----
From: "Peter Hansen" <peter at engcorp.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Thursday, September 27, 2001 10:23 PM
Subject: Re: file find module


> mallum wrote:
> >
> > on Thu, Sep 27, 2001 at 08:30:54PM +0400, Oleg Broytmann wrote:
> > >    ...you can easily write your own using os.path.walk(), anf glob (or
> > > fnmatch).
> >
> > aha ! This looks like just whats needed - thanks :)
>
> Just be careful because glob.glob('*') will not return filenames
> that start with a period, while glob.glob('.*') will return only
> such filenames.  You need both if you want all files.
>
> --
> ----------------------
> Peter Hansen, P.Eng.
> peter at engcorp.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>





More information about the Python-list mailing list