Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b2b440 commit 61700bbCopy full SHA for 61700bb
1 file changed
Tools/scripts/dutree.py
@@ -7,8 +7,11 @@ def main():
7
p = os.popen('du ' + string.join(sys.argv[1:]), 'r')
8
total, d = None, {}
9
for line in p.readlines():
10
- [num, file] = string.split(line)
11
- size = eval(num)
+ i = 0
+ while line[i] in '0123456789': i = i+1
12
+ size = eval(line[:i])
13
+ while line[i] in ' \t': i = i+1
14
+ file = line[i:-1]
15
comps = string.splitfields(file, '/')
16
if comps[0] == '': comps[0] = '/'
17
if comps[len(comps)-1] == '': del comps[len(comps)-1]
0 commit comments