Newbie: List file system roots

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Fri Aug 24 06:08:13 EDT 2007


"Einar W. Høst" wrote:
> How would you list the file system roots in Python? That is, I'm
> looking for a way to list all connected drives (C:, D: etc) on a
> Windows box, or all /root, /tmp etc on a *nix box. 

/root and /tmp are no "roots", but normal directories.
glob.glob("/*") will give you all of those. 

Regards,


Björn

-- 
BOFH excuse #236:

Fanout dropping voltage too much, try cutting some of those little
traces




More information about the Python-list mailing list