summaryrefslogtreecommitdiffstats
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-03-03 21:49:01 (GMT)
committerGuido van Rossum <guido@python.org>1998-03-03 21:49:01 (GMT)
commit5c1d2297ea1df3571e50d373fa2d1cbf21bcd31c (patch)
tree27665141a655ee3cc6f357d1ae4a1c636a6a9c9e /Lib/macpath.py
parent69f65801aba085385625ea7a4a14c6253f680fff (diff)
downloadcpython-5c1d2297ea1df3571e50d373fa2d1cbf21bcd31c.zip
cpython-5c1d2297ea1df3571e50d373fa2d1cbf21bcd31c.tar.gz
cpython-5c1d2297ea1df3571e50d373fa2d1cbf21bcd31c.tar.bz2
Instead of 'import mac', use 'import os' -- this way, the path syntax
manipulation routines can be used on non-Mac platforms (e.g. to manipulate pathnames in a Mac specific archive).
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 43bec56..eeed541 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -1,7 +1,7 @@
# module 'macpath' -- pathname (or -related) operations for the Macintosh
import string
-import mac
+import os
from stat import *
@@ -93,8 +93,8 @@ def basename(s): return split(s)[1]
def isdir(s):
try:
- st = mac.stat(s)
- except mac.error:
+ st = os.stat(s)
+ except os.error:
return 0
return S_ISDIR(st[ST_MODE])
@@ -110,8 +110,8 @@ def islink(s):
def isfile(s):
try:
- st = mac.stat(s)
- except mac.error:
+ st = os.stat(s)
+ except os.error:
return 0
return S_ISREG(st[ST_MODE])
@@ -120,8 +120,8 @@ def isfile(s):
def exists(s):
try:
- st = mac.stat(s)
- except mac.error:
+ st = os.stat(s)
+ except os.error:
return 0
return 1
@@ -186,8 +186,8 @@ def normpath(s):
def walk(top, func, arg):
try:
- names = mac.listdir(top)
- except mac.error:
+ names = os.listdir(top)
+ except os.error:
return
func(arg, top, names)
for name in names: