[Tutor] drive size

R. Alan Monroe R. Alan Monroe" <amonroe@columbus.rr.com
Sat Feb 1 17:43:01 2003


> is there an easy way to get a systems local drives along with its
> totalspace, freespace, and usedspace.

While we're on the subject, is there any handy way of getting a tree
containing the filesize of all files on the hard drive? Something
like:

folder games 300000 bytes
       folder pacman 100000 bytes
              file game 10000 bytes
              file gfx  20000 bytes
              file sound 70000 bytes
       folder galaxian 150000 bytes
...etc.

I found os.path.walk, but I assume I have to roll my own data
structure to store this. That's the part I wasn't too sure about.
Especially since the traditional way is to use pointers. I don't know
the pythonic way of doing trees.

Alan