diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-21 12:55:38 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-21 12:55:38 (GMT) |
commit | bb829b7c0205e9e75eaee10323a959169d7ecefc (patch) | |
tree | ea1d91d015f3fe10352868eab4434bc23c1f6cde | |
parent | 3e0196cc00a371a03a0e9c8b7ce71593681ef11d (diff) | |
download | cpython-bb829b7c0205e9e75eaee10323a959169d7ecefc.zip cpython-bb829b7c0205e9e75eaee10323a959169d7ecefc.tar.gz cpython-bb829b7c0205e9e75eaee10323a959169d7ecefc.tar.bz2 |
Getting rid of macfs.
-rw-r--r-- | Lib/tempfile.py | 12 | ||||
-rw-r--r-- | Mac/Lib/mkcwproject/__init__.py | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py index d322d8f..3682180 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -33,8 +33,8 @@ import errno as _errno from random import Random as _Random if _os.name == 'mac': - import macfs as _macfs - import MACFS as _MACFS + import Carbon.Folder as _Folder + import Carbon.Folders as _Folders try: import fcntl as _fcntl @@ -124,11 +124,11 @@ def _candidate_tempdir_list(): # Failing that, try OS-specific locations. if _os.name == 'mac': try: - refnum, dirid = _macfs.FindFolder(_MACFS.kOnSystemDisk, - _MACFS.kTemporaryFolderType, 1) - dirname = _macfs.FSSpec((refnum, dirid, '')).as_pathname() + fsr = _Folder.FSFindFolder(_Folders.kOnSystemDisk, + _Folders.kTemporaryFolderType, 1) + dirname = fsr.as_pathname() dirlist.append(dirname) - except _macfs.error: + except _Folder.error: pass elif _os.name == 'riscos': dirname = _os.getenv('Wimp$ScrapDir') diff --git a/Mac/Lib/mkcwproject/__init__.py b/Mac/Lib/mkcwproject/__init__.py index ea127ee..d6920b6 100644 --- a/Mac/Lib/mkcwproject/__init__.py +++ b/Mac/Lib/mkcwproject/__init__.py @@ -2,7 +2,7 @@ import cwxmlgen import cwtalker import os from Carbon import AppleEvents -import macfs +import Carbon.File def mkproject(outputfile, modulename, settings, force=0, templatename=None): # @@ -58,15 +58,15 @@ def mkproject(outputfile, modulename, settings, force=0, templatename=None): def makeproject(xmlfile, projectfile): cw = cwtalker.MyCodeWarrior(start=1) cw.send_timeout = AppleEvents.kNoTimeOut - xmlfss = macfs.FSSpec(xmlfile) - prjfss = macfs.FSSpec(projectfile) + xmlfss = Carbon.File.FSSpec(xmlfile) + prjfss = Carbon.File.FSSpec(projectfile) cw.my_mkproject(prjfss, xmlfss) cw.Close_Project() def buildproject(projectfile): cw = cwtalker.MyCodeWarrior(start=1) cw.send_timeout = AppleEvents.kNoTimeOut - prjfss = macfs.FSSpec(projectfile) + prjfss = Carbon.File.FSSpec(projectfile) cw.open(prjfss) cw.Make_Project() # XXX Should set target cw.Close_Project() @@ -74,7 +74,7 @@ def buildproject(projectfile): def cleanproject(projectfile): cw = cwtalker.MyCodeWarrior(start=1) cw.send_timeout = AppleEvents.kNoTimeOut - prjfss = macfs.FSSpec(projectfile) + prjfss = Carbon.File.FSSpec(projectfile) cw.open(prjfss) cw.Remove_Binaries() |