diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-06 23:13:11 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-06 23:13:11 (GMT) |
commit | 658375b833e9c3224a97c4b90a08fd615c84c267 (patch) | |
tree | 5d0ca0825e239970120cc803c8731085d41cc5f8 /Mac/scripts | |
parent | caaad98ebda9e1a3215ec1fc43c0d01c60cc1164 (diff) | |
download | cpython-658375b833e9c3224a97c4b90a08fd615c84c267.zip cpython-658375b833e9c3224a97c4b90a08fd615c84c267.tar.gz cpython-658375b833e9c3224a97c4b90a08fd615c84c267.tar.bz2 |
Got rid of macfs.
Diffstat (limited to 'Mac/scripts')
-rw-r--r-- | Mac/scripts/fixfiletypes.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Mac/scripts/fixfiletypes.py b/Mac/scripts/fixfiletypes.py index 872c891..bbbf807 100644 --- a/Mac/scripts/fixfiletypes.py +++ b/Mac/scripts/fixfiletypes.py @@ -8,10 +8,10 @@ # Jack Jansen, CWI, 1995. # import os -import macfs import EasyDialogs import sys import macostools +import MacOS list = [ ('.py', 'Pyth', 'TEXT'), @@ -30,11 +30,10 @@ def walktree(name, change): if os.path.isfile(name): for ext, cr, tp in list: if name[-len(ext):] == ext: - fs = macfs.FSSpec(name) - curcrtp = fs.GetCreatorType() + curcrtp = MacOS.GetCreatorAndType(name) if curcrtp <> (cr, tp): if change: - fs.SetCreatorType(cr, tp) + MacOS.SetCreatorAndType(name, cr, tp) macostools.touched(fs) print 'Fixed ', name else: @@ -52,6 +51,6 @@ def run(change): walktree(pathname, change) if __name__ == '__main__': - run(1) + run(0) |