diff options
| author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-06 23:13:11 +0000 |
|---|---|---|
| committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-06 23:13:11 +0000 |
| commit | 8789d06caf844669a9fed58fecfae3becb7e6313 (patch) | |
| tree | f0fa4df0b0f8e1f10c453717010fe5a4e791af99 /Mac/scripts | |
| parent | 1e0b81e5e0325e5fc1f5d01c3a86d54c27cae83e (diff) | |
| download | cpython-8789d06caf844669a9fed58fecfae3becb7e6313.tar.gz | |
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 872c891e99..bbbf80761c 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) |
