spir wrote:
> Hello,
>
> is there a way to make glob work in a specified dir?
> (or is it necessary to use os.chdir first?)
>
> Thank you,
> denis
> ------
> la vita e estrany
> _______________________________________________
> Tutor maillist - [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>
...
glob(pathname)
Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
fnmatch.
...
>>> glob.glob("/*r*/*/portage")
['/var/tmp/portage', '/var/lib/portage', '/var/log/portage',
'/usr/share/portage', '/usr/X11R6/portage', '/usr/tmp/portage',
'/usr/lib/portage', '/usr/lib64/portage']
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor