mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
join
This commit is contained in:
parent
d8641b3fdc
commit
4139466fc9
@ -5,7 +5,7 @@ SIMPLE_THREADS model, by avoiding blocking all threads while waiting
|
|||||||
for I/O to complete. """
|
for I/O to complete. """
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'file', 'open', 'listdir', 'walk'
|
'file', 'open', 'listdir', 'walk', 'join'
|
||||||
]
|
]
|
||||||
|
|
||||||
from pandac import PandaModules as pm
|
from pandac import PandaModules as pm
|
||||||
@ -271,12 +271,12 @@ def walk(top, topdown = True, onerror = None, followlinks = True):
|
|||||||
yield (top, dirnames, filenames)
|
yield (top, dirnames, filenames)
|
||||||
|
|
||||||
for dir in dirnames:
|
for dir in dirnames:
|
||||||
next = '%s/%s' % (top, dir)
|
next = join(top, dir)
|
||||||
for tuple in walk(next, topdown = topdown):
|
for tuple in walk(next, topdown = topdown):
|
||||||
yield tuple
|
yield tuple
|
||||||
|
|
||||||
if not topdown:
|
if not topdown:
|
||||||
yield (top, dirnames, filenames)
|
yield (top, dirnames, filenames)
|
||||||
|
|
||||||
|
def join(a, b):
|
||||||
|
return '%s/%s' % (a, b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user