os.walk: Get entire path

Peter Kleiweg in.aqua.scribis at nl.invalid
Sun Aug 29 17:35:51 CEST 2004


Florian Lindner schreef:

> Hello,
> when I'm walking through a file system hierarchy using os.walk, how can I
> get the full path of a file or dir? normpath and abspath don't work.


Sure it does.

os.path.abspath(os.path.join(root, file_or_dir))



-- 
Peter Kleiweg  L:NL,af,da,de,en,ia,nds,no,sv,(fr,it)  S:NL,de,en,(da,ia)
info: http://www.let.rug.nl/~kleiweg/ls.html




More information about the Python-list mailing list