Personal tools
You are here: Home Forum How to use Salome? calling Salome from a python script

calling Salome from a python script

Up to How to use Salome?
  • calling Salome from a python script

    Posted by tsachi at June 11. 2009
    Hello

    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?

    Best
    Tsachi
    • Re: calling Salome from a python script

      Posted by Christophe Bourcier at June 25. 2009
      Hi,

      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.

      Christophe
Powered by Ploneboard
Document Actions