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 7bf2aea963
commit d2b9e522d2

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