Skip to content

Commit 4a5ab81

Browse files
committed
posix -> os
1 parent 3a585bb commit 4a5ab81

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Tools/scripts/dutree.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#! /usr/local/python
22
# Format du output in a tree shape
33

4-
import posix, string, sys, path
4+
import os, string, sys
55

66
def main():
7-
p = posix.popen('du ' + string.join(sys.argv[1:]), 'r')
7+
p = os.popen('du ' + string.join(sys.argv[1:]), 'r')
88
total, d = None, {}
99
for line in p.readlines():
1010
[num, file] = string.split(line)
@@ -36,7 +36,7 @@ def show(total, d, prefix):
3636
list.append((tsub, key))
3737
if tsub is not None: sum = sum + tsub
3838
if sum < total:
39-
list.append((total - sum, '.'))
39+
list.append((total - sum, os.curdir))
4040
list.sort()
4141
list.reverse()
4242
width = len(`list[0][0]`)

0 commit comments

Comments
 (0)