[Tutor] glob.glob(pattern, dir) ?

Dave Angel davea at ieee.org
Tue Jun 9 20:39:19 CEST 2009


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
>   

You can hand glob.glob either a relative pathname (in which it's 
relative to the current directory), or an absolute pathname.



More information about the Tutor mailing list