Getting all the *files* from a directory -- A better way??

Carel Fellinger cfelling at iae.nl
Thu Mar 29 06:54:45 EST 2001


Fredrik Lundh <fredrik at pythonware.com> wrote:
> Alex Martelli wrote:
>> So wrap it up...:
>>
>> def joined_listdir(dir):
>>     return [os.path.join(dir,f) for f in os.listdir(dir)]

> or: glob.glob(os.path.join(dir, "*"))

this won't show `hidden' files on unix/linux.


-- 
groetjes, carel



More information about the Python-list mailing list