Skip to content
Snippets Groups Projects
Commit 61a0d059 authored by Papeleux Luc's avatar Papeleux Luc
Browse files

fix the use of scilab.bat as a scilab launcher and replace find_executable by...

fix the use of scilab.bat as a scilab launcher and replace find_executable by which in checkValidity
parent cbf29145
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
# Define external program paths according to local configuration
from prmClasses import *
import os, os.path, distutils.spawn
import os, os.path, shutil #,distutils.spawn
class ExtProgs(PRMSet):
def __init__(self, verb=False):
......@@ -66,10 +66,12 @@ class ExtProgs(PRMSet):
print("\t 3. If %s not in the Script last version, add it program in the Script..."%key)
return False
if distutils.spawn.find_executable(os.path.splitext(self.pars[key].val)[0]) :
#if distutils.spawn.find_executable(os.path.splitext(self.pars[key].val)[0]) :
#if os.path.exists(self.pars[key].val) :
if shutil.which(self.pars[key].val) :
return True
else:
print("%s is not found in %s ..."%(key, self.pars[key].val))
print("%s is not found at %s ..."%(key, self.pars[key].val))
print("\t Check installation and accessibility...")
print("\t Use 'externalProgramPathGui' to define the full program path (recommanded)")
print("\t or add %s in your user path (not recommanded)"%key)
......
......@@ -94,8 +94,12 @@ class ExtProgsConfGui(QWidget):
grplay2 = QGridLayout()
grplay2.setColumnStretch(2,1)
self.mesherGrpBox.setLayout(grplay2)
self.sf['MATLAB'] = ExeFileLine(self, grplay2, self.extProgPath.pars['MATLAB'], exeFileType, 0, 0, 4)
self.sf['SCILAB'] = ExeFileLine(self, grplay2, self.extProgPath.pars['SCILAB'], exeFileType, 1, 0, 4)
self.sf['MATLAB'] = ExeFileLine(self, grplay2, self.extProgPath.pars['MATLAB'], exeFileType, 0, 0, 4)
if isUnix():
self.sf['SCILAB'] = ExeFileLine(self, grplay2, self.extProgPath.pars['SCILAB'], exeFileType, 1, 0, 4)
else:
self.sf['SCILAB'] = ExeFileLine(self, grplay2, self.extProgPath.pars['SCILAB'], "bat files (*.bat)", 1, 0, 4)
#self.sf['SCILAB'] = ExeFileLine(self, grplay2, self.extProgPath.pars['SCILAB'], exeFileType, 1, 0, 4)
self.sf['GNUPLOT'] = ExeFileLine(self, grplay2, self.extProgPath.pars['GNUPLOT'], exeFileType, 2, 0, 4)
#Text & image
......@@ -104,8 +108,8 @@ class ExtProgsConfGui(QWidget):
grplay3 = QGridLayout()
grplay3.setColumnStretch(2,1)
self.mesherGrpBox.setLayout(grplay3)
self.sf['LATEX'] = ExeFileLine(self, grplay3, self.extProgPath.pars['LATEX'], exeFileType, 0, 0, 4)
self.sf['GHOSTSCRIPT'] = ExeFileLine(self, grplay3, self.extProgPath.pars['GHOSTSCRIPT'], exeFileType, 1, 0, 4)
self.sf['LATEX'] = ExeFileLine(self, grplay3, self.extProgPath.pars['LATEX'], exeFileType, 0, 0, 4)
self.sf['GHOSTSCRIPT'] = ExeFileLine(self, grplay3, self.extProgPath.pars['GHOSTSCRIPT'], exeFileType, 1, 0, 4)
self.sf['IMAGEMAGICK'] = ExeFileLine(self, grplay3, self.extProgPath.pars['IMAGEMAGICK'], exeFileType, 2, 0, 4)
def buildButtonFrame(self, box):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment