calling Salome from a python script
calling Salome from a python scriptPosted by tsachi at June 11. 2009Hello
I am trying to incorprate Salomes meshing capabilities into PUMA-EM (open source MLFMM).
I need to run salome from inside a python script, import the geometry file, mesh it, and save the mesh on the disc.
Still I didnt manage to find the exact lines I need to put in the code.
Can anyone help?
Re: calling Salome from a python scriptPosted by Christophe Bourcier at June 25. 2009Hi,
You have to use runSession to set Salome environnement. Then you will be able to launch any salome script from a terminal, provided that Salome is already launched.
Copy KERNEL_V4_1_4/bin/salome/appliskel/runSession to any directory and adapt the paths to your installation.
./runSalome #in a terminal to launch Salome
./runSession #in another terminal to set salome environment
python your_salome_script.py # to call salome python API.
Powered by Ploneboard