blender/intern/python/modules/blenderos.py

25 lines
484 B
Python
Raw Normal View History

2002-10-12 11:37:38 +00:00
# This is the built in Blender emulation module for os.py
# not all features are implemented yet...
import Blender.sys as bsys
sep = bsys.dirsep # path separator ('/' or '\')
class Path:
def dirname(self, name):
return bsys.dirname(name)
def join(self, a, *p):
dirsep = bsys.dirsep
path = a
for b in p:
if b[:1] == dirsep:
path = b
elif path == '' or path[-1:] == dirsep:
path = path + b
else:
path = path + dirsep + b
return path
path = Path()