summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/dutree.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Tools/scripts/dutree.py b/Tools/scripts/dutree.py
index a39f172..d3c905e 100755
--- a/Tools/scripts/dutree.py
+++ b/Tools/scripts/dutree.py
@@ -7,8 +7,11 @@ def main():
p = os.popen('du ' + string.join(sys.argv[1:]), 'r')
total, d = None, {}
for line in p.readlines():
- [num, file] = string.split(line)
- size = eval(num)
+ i = 0
+ while line[i] in '0123456789': i = i+1
+ size = eval(line[:i])
+ while line[i] in ' \t': i = i+1
+ file = line[i:-1]
comps = string.splitfields(file, '/')
if comps[0] == '': comps[0] = '/'
if comps[len(comps)-1] == '': del comps[len(comps)-1]