Re: searching for files on Windows with Python

2005-11-19 Thread Kent Johnson
Peter Hansen wrote: > Kent Johnson wrote: >> import path >> files = path.path(pathToSearch).walkfiles(filename) > > A minor enhancement (IMHO) (though I certainly agree with Kent's > recommendation here): since there is nothing else of interest in the > "path" module, it seems to be a fairly com

Re: searching for files on Windows with Python

2005-11-17 Thread Peter Hansen
Kent Johnson wrote: > I always use Jason Orendorff's path module for this kind of stuff. It's > way easier to use than os.whatever: > > import path > files = path.path(pathToSearch).walkfiles(filename) A minor enhancement (IMHO) (though I certainly agree with Kent's recommendation here): since

Re: searching for files on Windows with Python

2005-11-17 Thread Do Re Mi chel La Si Do
Hi! But fnmatch (or glob) is unix-like. With few error in windows (sample ? trye '*.' ) Test this code rather: import os l=os.popen4('dir c:\\python\\*.pyw /S /B')[1].readlines() print ''.join(l) @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/pytho

Re: searching for files on Windows with Python

2005-11-17 Thread Kent Johnson
Shane wrote: > I've been giving Google a good workout with no luck. I would like to > be able to search a Windows filesystem for filenames, returning a > list off absolute paths to the found files, something like:> > def findFiles(filename, pathToSearch): > ... > ... > return foundF

Re: searching for files on Windows with Python

2005-11-17 Thread Fredrik Lundh
Shane wrote: > I've been giving Google a good workout with no luck. I would like to be > able to search a Windows filesystem for filenames, returning a list off > absolute > paths to the found files, something like: maybe some variation of http://article.gmane.org/gmane.comp.python.general/

Re: searching for files on Windows with Python

2005-11-17 Thread Dennis Benzinger
Shane schrieb: > I've been giving Google a good workout with no luck. I would like to be able > to search a Windows filesystem for filenames, returning a list off absolute > paths to the found files, something like: > > def findFiles(filename, pathToSearch): > ... > ... > return f

searching for files on Windows with Python

2005-11-17 Thread Shane
I've been giving Google a good workout with no luck. I would like to be able to search a Windows filesystem for filenames, returning a list off absolute paths to the found files, something like: def findFiles(filename, pathToSearch): ... ... return foundFileNames Is the os module