summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-30 11:31:39 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-30 11:31:39 (GMT)
commit4a5ab81bc93004773070de89cc4acfad75103c7e (patch)
treec4b24256edab7146dc6a48fc53b0641f1fb1ecdd /Tools/scripts
parent3a585bb964483f2892f5a7bfc8e899806a1dc247 (diff)
downloadcpython-4a5ab81bc93004773070de89cc4acfad75103c7e.zip
cpython-4a5ab81bc93004773070de89cc4acfad75103c7e.tar.gz
cpython-4a5ab81bc93004773070de89cc4acfad75103c7e.tar.bz2
posix -> os
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/dutree.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/dutree.py b/Tools/scripts/dutree.py
index c309212..a39f172 100755
--- a/Tools/scripts/dutree.py
+++ b/Tools/scripts/dutree.py
@@ -1,10 +1,10 @@
#! /usr/local/python
# Format du output in a tree shape
-import posix, string, sys, path
+import os, string, sys
def main():
- p = posix.popen('du ' + string.join(sys.argv[1:]), 'r')
+ p = os.popen('du ' + string.join(sys.argv[1:]), 'r')
total, d = None, {}
for line in p.readlines():
[num, file] = string.split(line)
@@ -36,7 +36,7 @@ def show(total, d, prefix):
list.append((tsub, key))
if tsub is not None: sum = sum + tsub
if sum < total:
- list.append((total - sum, '.'))
+ list.append((total - sum, os.curdir))
list.sort()
list.reverse()
width = len(`list[0][0]`)