Debugging TUI scripts, print python errors in python console inside the GUI

I am trying to debug a python script in windows, and i am having the issue that when there is a warning (or sometimes an error), eg.“AttributeError: ‘list’ object has no attribute ‘GetNodeIDs’” is printed in the python3.exe console that is open at the same time as salome gui, instead of been printed in the python console inside salome, which renders the debugging sometimes,

  1. is it possible to print all this outputs in to the python console of salome?
  2. if not, is it possible to print something in the python3.exe console, i was thinking about printing a line of ‘#’ to know when is the output of the re runned script, but in that case if i add print(‘something’) this time it will be printed in the python console of salome.
    thanks in advance.


Are you trying to export your node IDs and coordinates? If so, the function is “GetNodesId()”, and to obtain the coordinates of that node, it is GetNodeXYZ(nodeid).

I have a script that exports nodes, elements, and groups of the mesh written and tested if you would like it. It will be appended to the end of the python dump script and will populate 3 .json files containing nodes, elements, groups, respectfully.

In terms of showing error codes outside of Salome GUI, I have not encountered a way to do this yet. Maybe another user or developer could provide guidance.