Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
862495a7
Commit
862495a7
authored
3 years ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
remove not working AllUser option in externalProgramPath
parent
61a0d059
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
externalProgramPath.py
+10
-7
10 additions, 7 deletions
externalProgramPath.py
externalProgramPathGui.pyw
+7
-8
7 additions, 8 deletions
externalProgramPathGui.pyw
with
17 additions
and
15 deletions
externalProgramPath.py
+
10
−
7
View file @
862495a7
...
...
@@ -4,7 +4,7 @@
# Define external program paths according to local configuration
from
prmClasses
import
*
import
os
,
os
.
path
,
shutil
#,
distutils.spawn
import
os
,
os
.
path
,
distutils
.
spawn
class
ExtProgs
(
PRMSet
):
def
__init__
(
self
,
verb
=
False
):
...
...
@@ -16,8 +16,13 @@ class ExtProgs(PRMSet):
def
loadPaths
(
self
):
home
=
os
.
path
.
expanduser
(
"
~
"
)
loc
=
os
.
path
.
abspath
(
'
.
'
)
return
[
home
,
loc
]
#print("sys.path[0] = ", sys.path[0])
#loc = os.path.abspath('.') non, '.' n'est pas le programDir (et pas vident de le trouver entre version Dev & installed)
# et sys.path[0] est le baseDir (pas le programDir !!!)
#print("home Path = ", home)
#print("local Path = ", loc)
#return [home, loc]
return
[
home
]
def
savePath
(
self
):
home
=
os
.
path
.
expanduser
(
"
~
"
)
...
...
@@ -66,12 +71,10 @@ 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 os.path.exists(self.pars[key].val) :
if
shutil
.
which
(
self
.
pars
[
key
].
val
)
:
if
distutils
.
spawn
.
find_executable
(
os
.
path
.
splitext
(
self
.
pars
[
key
].
val
)[
0
])
:
return
True
else
:
print
(
"
%s is not found
at
%s ...
"
%
(
key
,
self
.
pars
[
key
].
val
))
print
(
"
%s is not found
in
%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
)
...
...
This diff is collapsed.
Click to expand it.
externalProgramPathGui.pyw
+
7
−
8
View file @
862495a7
...
...
@@ -94,12 +94,11 @@ 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
[
'
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
[
'
SCILAB
'
]
=
ExeFileLine
(
self
,
grplay2
,
self
.
extProgPath
.
pars
[
'
SCILAB
'
],
"
bat file (*.bat)
"
,
1
,
0
,
4
)
self
.
sf
[
'
GNUPLOT
'
]
=
ExeFileLine
(
self
,
grplay2
,
self
.
extProgPath
.
pars
[
'
GNUPLOT
'
],
exeFileType
,
2
,
0
,
4
)
#Text & image
...
...
@@ -124,9 +123,9 @@ class ExtProgsConfGui(QWidget):
butlayout
.
addWidget
(
self
.
saveButton1
)
self
.
saveButton1
.
pressed
.
connect
(
self
.
userSave
)
self
.
saveButton2
=
QPushButton
(
self
.
tr
(
"
All Users Save
"
))
butlayout
.
addWidget
(
self
.
saveButton2
)
self
.
saveButton2
.
pressed
.
connect
(
self
.
progSave
)
#
self.saveButton2 = QPushButton(self.tr("All Users Save"))
#
butlayout.addWidget(self.saveButton2)
#
self.saveButton2.pressed.connect(self.progSave)
self
.
quitButton
=
QPushButton
(
self
.
tr
(
"
Quit
"
))
butlayout
.
addWidget
(
self
.
quitButton
)
...
...
@@ -158,12 +157,12 @@ class ExtProgsConfGui(QWidget):
if
self
.
extProgPath
.
debug
:
print
(
"
Save pressed
"
)
self
.
extProgPath
.
savePars
()
'''
def progSave(self):
if self.extProgPath.debug :
print(
"
Save pressed
"
)
self.extProgPath.savePars(
'
.
'
)
'''
def
quit
(
self
):
if
self
.
extProgPath
.
debug
:
print
(
"
Quit pressed
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment