diff options
author | Guido van Rossum <guido@python.org> | 1992-03-30 11:15:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-30 11:15:26 (GMT) |
commit | 9a6757dadeab6077f26f3bdfda17585780468121 (patch) | |
tree | 51674557c58f1b496bcf7042f47cc2f184f05ea0 /Tools/scripts/checkpyc.py | |
parent | 391b8b7deed0d2f555ebc61e969b8798e9379081 (diff) | |
download | cpython-9a6757dadeab6077f26f3bdfda17585780468121.zip cpython-9a6757dadeab6077f26f3bdfda17585780468121.tar.gz cpython-9a6757dadeab6077f26f3bdfda17585780468121.tar.bz2 |
posix -> os
Diffstat (limited to 'Tools/scripts/checkpyc.py')
-rwxr-xr-x | Tools/scripts/checkpyc.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Tools/scripts/checkpyc.py b/Tools/scripts/checkpyc.py index 54396a3..7916058 100755 --- a/Tools/scripts/checkpyc.py +++ b/Tools/scripts/checkpyc.py @@ -1,9 +1,8 @@ # Check that all ".pyc" files exist and are up-to-date -# Uses module 'posix' +# Uses module 'os' import sys -import posix -import path +import os from stat import ST_MTIME def main(): @@ -24,8 +23,8 @@ def main(): print 'Using MAGIC word', `MAGIC` for dirname in sys.path: try: - names = posix.listdir(dirname) - except posix.error: + names = os.listdir(dirname) + except os.error: print 'Cannot list directory', `dirname` continue if not silent: @@ -33,10 +32,10 @@ def main(): names.sort() for name in names: if name[-3:] == '.py': - name = path.join(dirname, name) + name = os.path.join(dirname, name) try: - st = posix.stat(name) - except posix.error: + st = os.stat(name) + except os.error: print 'Cannot stat', `name` continue if verbose: |