Re: Simple py script to calc folder sizes

2006-03-30 Thread Caleb Hattingh
Ben, Thank you. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple py script to calc folder sizes

2006-03-30 Thread Ben Cartwright
Caleb Hattingh wrote: > Your code works on some folders but not others. For example, it works > on my /usr/lib/python2.4 (the example you gave), but on other folders > it terminates early with StopIteration exception on the > os.walk().next() step. > > I haven't really looked at this closely enou

Re: Simple py script to calc folder sizes

2006-03-29 Thread Caleb Hattingh
Hi John Your code works on some folders but not others. For example, it works on my /usr/lib/python2.4 (the example you gave), but on other folders it terminates early with StopIteration exception on the os.walk().next() step. I haven't really looked at this closely enough yet, but it looks as

Re: Simple py script to calc folder sizes

2006-03-28 Thread Caleb Hattingh
Thanks John I will use your code :) 30% improvement is not insignificant, and that's what I was looking for. I find the log function a little harder to read, but I guess that is a limitation of me, not your code. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple py script to calc folder sizes

2006-03-21 Thread John Zenger
Caleb Hattingh wrote: > Hi everyone > > [Short version: I put a some code below: what changes can make it run > faster?] On my slow notebook, your code takes about 1.5 seconds to do my C:\Python24 dir. With a few changes my code does it in about 1 second. Here is my code: import os, os.path,

Re: Simple py script to calc folder sizes

2006-03-21 Thread Ben Cartwright
Caleb Hattingh wrote: > Unless you have a nice tool handy, calculating many folder sizes for > clearing disk space can be a click-fest nightmare. Looking around, I > found Baobab (gui tool); the "du" linux/unix command-line tool; the > extremely impressive tkdu: http://unpythonic.net/jeff/tkdu/ ;

Simple py script to calc folder sizes

2006-03-21 Thread Caleb Hattingh
Hi everyone [Short version: I put a some code below: what changes can make it run faster?] Unless you have a nice tool handy, calculating many folder sizes for clearing disk space can be a click-fest nightmare. Looking around, I found Baobab (gui tool); the "du" linux/unix command-line tool; th