Re: globbing multiple wildcards

2005-05-07 Thread [EMAIL PROTECTED]
Then take a look at os.walk, see
http://docs.python.org/lib/os-file-dir.html

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: globbing multiple wildcards

2005-05-07 Thread utabintarbo
Is there any way to make this recursive? That is what I was looking
for.

Sorry I wasn't too clear before.

Bob

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: globbing multiple wildcards

2005-05-07 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:
> I have a path spec similar to '/home/*/.mozilla/*/*/cache*/*' (this
> will probably look familiar to *nix users) with multiple wildcards. I
> am finding it difficult gathering ALL file pathnames which match this
> spec. Can anyone shed some light on this for a python noob?

import glob
glob.glob('/home/*/.mozilla/*/*/cache*/*')
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: globbing multiple wildcards

2005-05-07 Thread utabintarbo
OK, I guess it WAS that easy. :-P

Thanks for the replys.

Bob

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: globbing multiple wildcards

2005-05-07 Thread [EMAIL PROTECTED]
what about :
[EMAIL PROTECTED]:~$ python
Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import glob
>>> print glob.glob('/home/*/.mozilla/*/*/Cache*/*')
['/home/martin/.mozilla/firefox/dem8d5eu.default/Cache/_CACHE_MAP_',
'/home/martin/.mozilla/firefox/dem8d5eu.default/Cache/_CACHE_001_',
.
'/home/martin/.mozilla/firefox/dem8d5eu.default/Cache/66FA72F2d01',
'/home/martin/.mozilla/firefox/dem8d5eu.default/Cache/85F82253d01',
'/home/martin/.mozilla/firefox/dem8d5eu.default/Cache/CE3B4D9Cd01']
>>>

-- 
http://mail.python.org/mailman/listinfo/python-list


globbing multiple wildcards

2005-05-07 Thread utabintarbo
I have a path spec similar to '/home/*/.mozilla/*/*/cache*/*' (this
will probably look familiar to *nix users) with multiple wildcards. I
am finding it difficult gathering ALL file pathnames which match this
spec. Can anyone shed some light on this for a python noob?

TIA
Bob

-- 
http://mail.python.org/mailman/listinfo/python-list