Mercurial > cpython-lru_cache-weakref
diff Mac/scripts/fixfiletypes.py @ 27742:9503685fb4e8 legacy-trunk
Got rid of macfs.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Thu, 06 Feb 2003 23:13:11 +0000 |
| parents | caa6df9e0880 |
| children | c9a00590b901 |
line wrap: on
line diff
--- a/Mac/scripts/fixfiletypes.py Thu Feb 06 23:12:23 2003 +0000 +++ b/Mac/scripts/fixfiletypes.py Thu Feb 06 23:13:11 2003 +0000 @@ -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 @@ 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 @@ walktree(pathname, change) if __name__ == '__main__': - run(1) + run(0)
