diff options
author | Hans Lambermont <hans@lambermont.dyndns.org> | 2002-10-12 15:37:38 +0400 |
---|---|---|
committer | Hans Lambermont <hans@lambermont.dyndns.org> | 2002-10-12 15:37:38 +0400 |
commit | 12315f4d0e0ae993805f141f64cb8c73c5297311 (patch) | |
tree | 59b45827cd8293cfb727758989c7a74b40183974 /intern/python/modules/blenderos.py |
Initial revisionv2.25
Diffstat (limited to 'intern/python/modules/blenderos.py')
-rw-r--r-- | intern/python/modules/blenderos.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/intern/python/modules/blenderos.py b/intern/python/modules/blenderos.py new file mode 100644 index 00000000000..d093388d88f --- /dev/null +++ b/intern/python/modules/blenderos.py @@ -0,0 +1,24 @@ +# 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() + |