using Salome without GUI
using Salome without GUIPosted by Manav Bhatia at June 04. 2008Hi, I have my python script that creates a geometry, meshes it and writes it to the disk. So far, I have been opening the Salome GUI, and running it from the console there. Is there a way to do this without the GUI? i.e., run the script from the unix shell? I will appreciate any hints. Thanks, Manav
Re: using Salome without GUIPosted by woru1 at September 17. 2009
Add the directory where runSalome is to the path:
Re: using Salome without GUIPosted by Erwan ADAM at June 04. 2008Something like that ??
sys.argv += ["--show-desktop=0"]
sys.argv += ["--modules=GEOM"]
clt, d = runSalome.main()
port = d['port']
self.port = port
from os import system
x = X()
from geompy import *
box = MakeBox(0.0, 0.0, 0.0, 100.0, 100.0, 100.0)
You can save that in box.py and launch python box.py ...
It should work !!
Re: using Salome without GUIPosted by Gerhard Holzinger at September 03. 2009
This script does not work for me.
[caelinux@dyn165012 work]$ python box.py
Traceback (most recent call last):
File "box.py", line 17, in ?
x = X()
File "box.py", line 3, in __init__
ImportError: No module named runSalome
Exception exceptions.AttributeError: "'X' object has no attribute 'port'" in <bound method X.__del__ of <__main__.X object at 0xb7b6c0ac>> ignored
What's the reason for this?