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
93820cd2
Commit
93820cd2
authored
4 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
futurize pyw
parent
5cec6bf0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
externalProgramPathGui.pyw
+7
-6
7 additions, 6 deletions
externalProgramPathGui.pyw
launchGui.pyw
+14
-11
14 additions, 11 deletions
launchGui.pyw
postProLoopGui.pyw
+7
-6
7 additions, 6 deletions
postProLoopGui.pyw
with
28 additions
and
23 deletions
externalProgramPathGui.pyw
+
7
−
6
View file @
93820cd2
...
...
@@ -4,6 +4,7 @@
# Gui to configure externals program path according to local configuration
## Qt ##
from
__future__
import
print_function
foundQt
=
0
try
:
from
PyQt4.QtCore
import
*
...
...
@@ -137,20 +138,20 @@ class ExtProgsConfGui(QWidget):
def
updateWidgetsValues
(
self
):
self
.
extProgPath
.
applyDependencies
()
if
self
.
extProgPath
.
debug
:
print
"
updateWidgetsValues
"
print
(
"
updateWidgetsValues
"
)
for
var
in
self
.
sf
:
self
.
sf
[
var
].
setParamValue
()
def
updateWidgetsVisibility
(
self
):
if
self
.
extProgPath
.
debug
:
print
"
updateWidgetsVisibility
"
print
(
"
updateWidgetsVisibility
"
)
# update enabled/disabled of options
self
.
extProgPath
.
configActions
()
for
var
in
self
.
sf
:
self
.
sf
[
var
].
setEnabled
(
self
.
extProgPath
.
pars
[
var
].
enabled
)
def
updateWidgetsValues
(
self
):
if
self
.
extProgPath
.
debug
:
print
"
updateWidgetsVisibility
"
print
(
"
updateWidgetsVisibility
"
)
# update enabled/disabled of options
self
.
extProgPath
.
configActions
()
for
var
in
self
.
sf
:
...
...
@@ -158,17 +159,17 @@ class ExtProgsConfGui(QWidget):
def
userSave
(
self
):
if
self
.
extProgPath
.
debug
:
print
"
Save pressed
"
print
(
"
Save pressed
"
)
self
.
extProgPath
.
savePars
()
def
progSave
(
self
):
if
self
.
extProgPath
.
debug
:
print
"
Save pressed
"
print
(
"
Save pressed
"
)
self
.
extProgPath
.
savePars
(
'
.
'
)
def
quit
(
self
):
if
self
.
extProgPath
.
debug
:
print
"
Quit pressed
"
print
(
"
Quit pressed
"
)
sys
.
exit
()
...
...
This diff is collapsed.
Click to expand it.
launchGui.pyw
+
14
−
11
View file @
93820cd2
...
...
@@ -11,6 +11,9 @@
# unicodestr.encode('ascii','ignore')
#
from
__future__
import
print_function
from
builtins
import
map
from
builtins
import
str
import
os
,
sys
from
prmClassesGui
import
*
from
launch
import
*
...
...
@@ -239,7 +242,7 @@ class LaunchGui(QWidget):
# ----------------------------------------------------------------------------------
def
go
(
self
):
print
"
Go pressed
"
print
(
"
Go pressed
"
)
# disable the gui modifications during run
self
.
guiEnable
(
False
)
...
...
@@ -274,7 +277,7 @@ class LaunchGui(QWidget):
# launch.go() ...
self
.
launch
.
go
()
except
Exception
,
e
:
except
Exception
as
e
:
#print e
QMessageBox
.
information
(
self
,
'
Error
'
,
str
(
e
))
...
...
@@ -282,9 +285,9 @@ class LaunchGui(QWidget):
self
.
guiEnable
(
True
)
def
interrupt
(
self
):
print
"
interrupt pressed
"
print
(
"
interrupt pressed
"
)
self
.
process
.
kill
()
print
"
interrupt done
"
print
(
"
interrupt done
"
)
# Boucle d'execution du Qprocess avec recuperation des events
def
waitQProcessForFinish
(
self
):
...
...
@@ -300,25 +303,25 @@ class LaunchGui(QWidget):
return
retcode
def
save
(
self
):
print
"
Save pressed
"
print
(
"
Save pressed
"
)
self
.
baseDir
.
savePars
()
#self.launch.printPars()
self
.
launch
.
savePars
()
def
quit
(
self
):
print
"
Quit pressed
"
print
(
"
Quit pressed
"
)
sys
.
exit
()
def
updateWidgetsValues
(
self
):
self
.
launch
.
applyDependencies
()
if
self
.
launch
.
debug
:
print
"
updateWidgetsValues
"
print
(
"
updateWidgetsValues
"
)
for
var
in
self
.
sf
:
self
.
sf
[
var
].
setParamValue
()
def
updateWidgetsVisibility
(
self
):
if
self
.
launch
.
debug
:
print
"
updateWidgetsVisibility
"
print
(
"
updateWidgetsVisibility
"
)
# update enabled/disabled of options
self
.
launch
.
configActions
()
for
var
in
self
.
sf
:
...
...
@@ -367,7 +370,7 @@ class LaunchGui(QWidget):
def
write
(
self
,
stuff
):
if
'
\n
'
in
stuff
:
map
(
self
.
writeLine
,
stuff
.
split
(
"
\n
"
)
)
list
(
map
(
self
.
writeLine
,
stuff
.
split
(
"
\n
"
)
)
)
else
:
self
.
buf
+=
stuff
self
.
app
.
processEvents
()
...
...
@@ -386,14 +389,14 @@ def main():
#define launcher
launch
=
LaunchJob
()
if
launch
.
debug
:
print
"
launch defined
"
print
(
"
launch defined
"
)
# create gui
launchGui
=
LaunchGui
(
launch
)
# opening Gui
launchGui
.
show
()
# signal pour cloturer proprement l'application PyQt quand on ferme la fenetre
launchGui
.
app
.
lastWindowClosed
.
connect
(
launchGui
.
app
.
quit
)
print
"
ready.
"
print
(
"
ready.
"
)
sys
.
exit
(
launchGui
.
app
.
exec_
())
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
postProLoopGui.pyw
+
7
−
6
View file @
93820cd2
...
...
@@ -7,6 +7,7 @@
#
## Qt ##
from
__future__
import
print_function
foundQt
=
0
try
:
from
PyQt4.QtCore
import
*
...
...
@@ -176,13 +177,13 @@ class PostProLoopGui(QWidget):
def
updateWidgetsValues
(
self
):
self
.
postProLoop
.
applyDependencies
()
if
self
.
postProLoop
.
debug
:
print
"
updateWidgetsValues
"
print
(
"
updateWidgetsValues
"
)
for
var
in
self
.
sf
:
self
.
sf
[
var
].
setParamValue
()
def
updateWidgetsVisibility
(
self
):
if
self
.
postProLoop
.
debug
:
print
"
updateWidgetsVisibility
"
print
(
"
updateWidgetsVisibility
"
)
# update enabled/disabled of options
self
.
postProLoop
.
configActions
()
for
var
in
self
.
sf
:
...
...
@@ -190,7 +191,7 @@ class PostProLoopGui(QWidget):
def
updateWidgetsValues
(
self
):
if
self
.
postProLoop
.
debug
:
print
"
updateWidgetsVisibility
"
print
(
"
updateWidgetsVisibility
"
)
# update enabled/disabled of options
self
.
postProLoop
.
configActions
()
for
var
in
self
.
sf
:
...
...
@@ -198,17 +199,17 @@ class PostProLoopGui(QWidget):
def
go
(
self
):
if
self
.
postProLoop
.
debug
:
print
"
Go pressed
"
print
(
"
Go pressed
"
)
self
.
postProLoop
.
go
()
def
save
(
self
):
if
self
.
postProLoop
.
debug
:
print
"
Save pressed
"
print
(
"
Save pressed
"
)
self
.
postProLoop
.
savePars
(
'
.
'
)
def
quit
(
self
):
if
self
.
postProLoop
.
debug
:
print
"
Quit pressed
"
print
(
"
Quit pressed
"
)
sys
.
exit
()
# ============== Main ========================
...
...
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