[Tutor] Re: directory size
Prahlad Vaidyanathan
slime@vsnl.net
Tue, 6 Aug 2002 08:54:44 +0530
Hi,
On Fri, 02 Aug 2002 Klaus Boehm spewed into the ether:
> How can i determine the size of a directory?
> In Linux there is a command like " du -hc ." .
> Is there a similar way in python.
After looking at Danny's code, I thought it would be a neat
script to hack up, so I decided to implement this. My first
attempt is here :
http://www.symonds.net/~prahladv/files/pydu.py
It is _very_ basic, but it does the job.
HTH,
pv.
ps. I didn't use os.path.walk() because I find it a tad bit
scary :)
--
Prahlad Vaidyanathan <http://www.symonds.net/~prahladv/>
Reply hazy, ask again later.