[Tutor] code quest

Alan Gauld alan.gauld at btinternet.com
Sat Nov 20 23:41:38 CET 2010


"Kirk Bailey" <kbailey at howlermonkey.net> wrote

> OK, I need to create or find a function that will return a list of 
> DIRECTORIES (only) which are under 'the current directory'. Anyone 
> got some clue on this? Please advise.

You can use os.walk() to get a list of directories and files and
then just throw away the files...

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list