It is possible to open an IDLE shell, e.g. to try interactive Python commands, with the Tcl proc GiD_Python_Open_IDLE_Shell
In practice go to GiD menu Utilities->Tools->Console Python…
e.g. the next picture show this IDLE console and the use of a Python command to set a variable with the current number of surfaces asked to GiD
num_surfaces=tcl.GiD_Info("geometry","numsurfaces")
and it creates in GiD a new straight line in the layer Layer0 from the point id=1 to the point id=2 and store the new line id in a variable
id_new_line=tcl.GiD_Geometry("create","line","append","stline","Layer0","1","2")
Note that the new line is not immediately shown, until the model is redrawn (can invoke it with with tcl.GiD_Redraw()
)
Note: The use of this console is recommended to interactively try several Python commands.