OpenSCAD: call which to find openscad executable

on all platforms except 'win32'
This commit is contained in:
Sebastian Hoogen 2013-07-10 20:52:23 +02:00
parent 3b32918e54
commit 12f4190c93

View File

@ -48,11 +48,11 @@ def searchforopenscadexe():
for testpath in testpaths:
if os.path.isfile(testpath):
return testpath
else:
p1=subprocess.Popen(['which','openscad'],stdout=subprocess.PIPE)
if p1.wait() == 0:
opath=p1.stdout.read().split('\n')[0]
return opath
else: #unix
p1=subprocess.Popen(['which','openscad'],stdout=subprocess.PIPE)
if p1.wait() == 0:
opath=p1.stdout.read().split('\n')[0]
return opath
def workaroundforissue128needed():
'''sets the import path depending on the OpenSCAD Verion