-
Notifications
You must be signed in to change notification settings - Fork 1
/
__init__.py.in
31 lines (26 loc) · 1.23 KB
/
__init__.py.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#import pypes
#import vtkvmtk
#import vmtkscripts
import sys
import os
if sys.platform == "win32":
ldEnvironmentVariable = "PATH"
currentEnviron = dict()
currentEnviron[ldEnvironmentVariable] = ""
currentEnviron["PYTHONPATH"] = ""
if os.environ.has_key(ldEnvironmentVariable):
currentEnviron[ldEnvironmentVariable] = os.environ[ldEnvironmentVariable]
if os.environ.has_key("PYTHONPATH"):
currentEnviron["PYTHONPATH"] = os.environ["PYTHONPATH"]
newEnviron = {}
vmtkhome = os.path.dirname(os.path.abspath(__file__))
vtkdir = (os.path.join(vmtkhome,"lib"))
newEnviron[ldEnvironmentVariable] = os.path.join(vmtkhome,"bin") + os.path.pathsep + \
os.path.join(vtkdir) + os.path.pathsep + \
os.path.join(vmtkhome) + os.path.pathsep + \
os.path.join(vmtkhome,"vtk")
os.environ[ldEnvironmentVariable] = newEnviron[ldEnvironmentVariable] + os.path.pathsep + currentEnviron[ldEnvironmentVariable]
sys.path.append(os.path.join(vmtkhome,"bin"))
sys.path.append(os.path.join(vtkdir))
sys.path.append(os.path.join(vmtkhome))
sys.path.append(os.path.join(vmtkhome,"vtk"))