From 4139466fc94498ed17f31b12f80497a86f39aee1 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 12 Nov 2008 04:05:21 +0000 Subject: [PATCH] join --- direct/src/stdpy/file.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/src/stdpy/file.py b/direct/src/stdpy/file.py index 15a70e063a..176fc718a3 100644 --- a/direct/src/stdpy/file.py +++ b/direct/src/stdpy/file.py @@ -5,7 +5,7 @@ SIMPLE_THREADS model, by avoiding blocking all threads while waiting for I/O to complete. """ __all__ = [ - 'file', 'open', 'listdir', 'walk' + 'file', 'open', 'listdir', 'walk', 'join' ] from pandac import PandaModules as pm @@ -271,12 +271,12 @@ def walk(top, topdown = True, onerror = None, followlinks = True): yield (top, dirnames, filenames) for dir in dirnames: - next = '%s/%s' % (top, dir) + next = join(top, dir) for tuple in walk(next, topdown = topdown): yield tuple if not topdown: yield (top, dirnames, filenames) - - +def join(a, b): + return '%s/%s' % (a, b)