summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-31 19:05:44 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-31 19:05:44 (GMT)
commit50399ae583a2b675ad5d38e77feb05372d63275d (patch)
tree11fa0a63147e006d9c5def13dd0e5df53e38befd /Mac
parentd9596e3a7943159c4e5bd38b2d198e17ec8dcfe8 (diff)
downloadcpython-50399ae583a2b675ad5d38e77feb05372d63275d.zip
cpython-50399ae583a2b675ad5d38e77feb05372d63275d.tar.gz
cpython-50399ae583a2b675ad5d38e77feb05372d63275d.tar.bz2
mac -> os (can't this go now dircache is universal?)
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/maccache.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Mac/Lib/maccache.py b/Mac/Lib/maccache.py
index 725f10e..1e2b3d0 100644
--- a/Mac/Lib/maccache.py
+++ b/Mac/Lib/maccache.py
@@ -1,9 +1,9 @@
# Module 'maccache'
#
# Maintain a cache of listdir(), isdir(), isfile() or exists() outcomes.
+# XXX Should merge with module statcache
-import mac
-import macpath
+import os
# The cache.
@@ -15,7 +15,7 @@ cache = {}
# Current working directory.
#
-cwd = mac.getcwd()
+cwd = os.getcwd()
# Constants.
@@ -25,14 +25,14 @@ FILE = 1
LISTTYPE = type([])
def _stat(name):
- name = macpath.join(cwd, name)
+ name = os.path.join(cwd, name)
if cache.has_key(name):
return cache[name]
- if macpath.isfile(name):
+ if os.path.isfile(name):
cache[name] = FILE
return FILE
try:
- list = mac.listdir(name)
+ list = os.listdir(name)
except:
cache[name] = NONE
return NONE