diff --git a/python/__init__.py b/python/__init__.py index 4babe197..a651aa48 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1,7 +1,10 @@ from os import environ from sys import path -from sys import platform as _platform +from sys import platform as __platform path.append(environ['NETGENDIR']+'/../lib') +from . import csg +from . import meshing + del environ del path diff --git a/python/csg.py b/python/csg.py index 9fd41225..1324a0a7 100644 --- a/python/csg.py +++ b/python/csg.py @@ -1,9 +1,9 @@ -from netgen import _platform -if _platform.startswith('linux') or _platform.startswith('darwin'): +from netgen import __platform +if __platform.startswith('linux') or __platform.startswith('darwin'): # Linux or Mac OS X from libcsg.csg import * from libmesh.meshing import * -if _platform.startswith('win'): +if __platform.startswith('win'): # Windows from nglib.csg import * from nglib.meshing import * diff --git a/python/meshing.py b/python/meshing.py index 2c8e79ab..5388017b 100644 --- a/python/meshing.py +++ b/python/meshing.py @@ -1,7 +1,7 @@ -from netgen import _platform -if _platform.startswith('linux') or _platform.startswith('darwin'): +from netgen import __platform +if __platform.startswith('linux') or __platform.startswith('darwin'): # Linux or Mac OS X from libmesh.meshing import * -if _platform.startswith('win'): +if __platform.startswith('win'): # Windows from nglib.meshing import *