diff options
author | Guido van Rossum <guido@python.org> | 1991-08-16 13:28:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-08-16 13:28:23 (GMT) |
commit | 784ca6c835b6e872313532b2df482671d7c68916 (patch) | |
tree | b869d480dbabb19bdf57be6da09dda6d8ffc032b /Lib | |
parent | 668317db897185c0cbc2ee97d6344a08d233469c (diff) | |
download | cpython-784ca6c835b6e872313532b2df482671d7c68916.zip cpython-784ca6c835b6e872313532b2df482671d7c68916.tar.gz cpython-784ca6c835b6e872313532b2df482671d7c68916.tar.bz2 |
path.cat --> join
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/dircache.py | 2 | ||||
-rw-r--r-- | Lib/dircmp.py | 10 | ||||
-rw-r--r-- | Lib/glob.py | 4 | ||||
-rw-r--r-- | Lib/lib-stdwin/dirwin.py | 4 | ||||
-rw-r--r-- | Lib/shutil.py | 4 | ||||
-rwxr-xr-x | Lib/stdwin/dirwin.py | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/Lib/dircache.py b/Lib/dircache.py index b40f76e..1eebbbc 100644 --- a/Lib/dircache.py +++ b/Lib/dircache.py @@ -32,5 +32,5 @@ opendir = listdir # XXX backward compatibility def annotate(head, list): # Add '/' suffixes to directories for i in range(len(list)): - if path.isdir(path.cat(head, list[i])): + if path.isdir(path.join(head, list[i])): list[i] = list[i] + '/' diff --git a/Lib/dircmp.py b/Lib/dircmp.py index 819f0bd..60afcdd 100644 --- a/Lib/dircmp.py +++ b/Lib/dircmp.py @@ -53,8 +53,8 @@ class dircmp(): dd.common_funny = [] # for x in dd.common: - a_path = path.cat(dd.a, x) - b_path = path.cat(dd.b, x) + a_path = path.join(dd.a, x) + b_path = path.join(dd.b, x) # ok = 1 try: @@ -92,8 +92,8 @@ class dircmp(): # The hide and ignore properties are inherited from the parent dd.subdirs = {} for x in dd.common_dirs: - a_x = path.cat(dd.a, x) - b_x = path.cat(dd.b, x) + a_x = path.join(dd.a, x) + b_x = path.join(dd.b, x) dd.subdirs[x] = newdd = dircmp().new(a_x, b_x) newdd.hide = dd.hide newdd.ignore = dd.ignore @@ -151,7 +151,7 @@ class dircmp(): def cmpfiles(a, b, common): res = ([], [], []) for x in common: - res[cmp(path.cat(a, x), path.cat(b, x))].append(x) + res[cmp(path.join(a, x), path.join(b, x))].append(x) return res diff --git a/Lib/glob.py b/Lib/glob.py index 8a70f0e..e29095c 100644 --- a/Lib/glob.py +++ b/Lib/glob.py @@ -17,7 +17,7 @@ def glob(pathname): result = [] for dirname in list: if basename or path.isdir(dirname): - name = path.cat(dirname, basename) + name = path.join(dirname, basename) if path.exists(name): result.append(name) else: @@ -25,7 +25,7 @@ def glob(pathname): for dirname in list: sublist = glob1(dirname, basename) for name in sublist: - result.append(path.cat(dirname, name)) + result.append(path.join(dirname, name)) return result def glob1(dirname, pattern): diff --git a/Lib/lib-stdwin/dirwin.py b/Lib/lib-stdwin/dirwin.py index 0b3b5db..d0a8525 100644 --- a/Lib/lib-stdwin/dirwin.py +++ b/Lib/lib-stdwin/dirwin.py @@ -11,7 +11,7 @@ import dircache def action(w, string, i, detail): (h, v), clicks, button, mask = detail if clicks = 2: - name = path.cat(w.name, string) + name = path.join(w.name, string) try: w2 = anywin.open(name) w2.parent = w @@ -19,7 +19,7 @@ def action(w, string, i, detail): stdwin.message('Can\'t open ' + name + ': ' + why[1]) def open(name): - name = path.cat(name, '') + name = path.join(name, '') list = dircache.opendir(name)[:] list.sort() dircache.annotate(name, list) diff --git a/Lib/shutil.py b/Lib/shutil.py index cf63396..d3521ec 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -52,8 +52,8 @@ def copytree(src, dst): dot_dotdot = '.', '..' for name in names: if name not in dot_dotdot: - srcname = path.cat(src, name) - dstname = path.cat(dst, name) + srcname = path.join(src, name) + dstname = path.join(dst, name) #print 'Copying', srcname, 'to', dstname try: #if path.islink(srcname): diff --git a/Lib/stdwin/dirwin.py b/Lib/stdwin/dirwin.py index 0b3b5db..d0a8525 100755 --- a/Lib/stdwin/dirwin.py +++ b/Lib/stdwin/dirwin.py @@ -11,7 +11,7 @@ import dircache def action(w, string, i, detail): (h, v), clicks, button, mask = detail if clicks = 2: - name = path.cat(w.name, string) + name = path.join(w.name, string) try: w2 = anywin.open(name) w2.parent = w @@ -19,7 +19,7 @@ def action(w, string, i, detail): stdwin.message('Can\'t open ' + name + ': ' + why[1]) def open(name): - name = path.cat(name, '') + name = path.join(name, '') list = dircache.opendir(name)[:] list.sort() dircache.annotate(name, list) |