Exit Salome by python script, Bug?
Hello,
I try to start Salome in TUI Mode, run a script, and close Salome.
It works fine in Salome 5.1.5 but not at 6.1.3.
Is this a bug?
Or are there other ways to end Salome in version 6.1.3?
My Script is in the attachment.
To run it: just enter your paths in config.py and run Start_5_1_5/_6_1_3
best regards
zedd
Exeuse me Zedd, I have problem to close Salome prosess on windows. May bee you help me? Thanks
C:\Salome5.1.2_ForTestsOnWindows\release\salome.bat -t C:\ASTER\release\qw.py
[code]
# -*- coding: iso-8859-1 -*-
###
### This file is generated automatically by SALOME v5.1.5 with dump python functionality
###
import sys
import salome
salome.salome_init()
import salome_notebook
notebook = salome_notebook.notebook
sys.path.insert( 0, r'C:/ASTER/release')
import qw_GEOM
qw_GEOM.RebuildData(salome.myStudy)
import qw_SMESH
qw_SMESH.RebuildData(salome.myStudy)
# If launched in text mode, we quit Salome
if not salome.sg.hasDesktop():
sys.exit()
else:
# we update the object browser
salome.sg.updateObjBrowser(0)
[/code]
Hello,
I had similar problems when running salome in batch mode.
Try this command at the end of your script to shut salome down:
os._exit(0)
THis works for me in any case.
Regards,
Richard
Thanks for the answer,
i tryed it, but there are some processes still open.
I figured out that Salome has a killSalome.py which really kills all processes.
This works, but I'm not happy with this solution. Is there a way to shutdown Salome?
@oleg
I don't know if Salome 5.1.2 has also the killSalome.py file.
Code:
import killSalome
killSalome.killAllPorts()
Best Regards,
zedd
