get all paths

Gerhard Häring gh_pythonlist at gmx.de
Wed Feb 6 15:37:46 EST 2002


Le 06/02/02 à 12:19, Ed écrivit:
> Hi
> I'm trying to create a treeview widget, but i am having problems
> getting alll directories and files from a specified directory
> 
> i.e
> 
> getList("C:/") should return all directories and files from C:/
> onwards whereas
> getList("C:/Python") should return all from that onwards

You can use the following functions: os.listdir(), os.path.isdir(),
os.path.isfile().

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 4.4 °C      Wind: 3.7 m/s




More information about the Python-list mailing list