Welcome to mirror list, hosted at ThFree Co, Russian Federation.

blenderos.py « modules « python « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d093388d88f04f43b86ebcc52b93d5c8fbfc0258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()