Python print to file
To debug Python code it is always possible to print data of variables to a file, with something like this:
f=open('C:/temp/my_debug.txt','a') f.write('hello world\n') f.close()
Python show text with W
If Python is running in GiD then can call the Tcl GiD procedure called W that show text in a window
e.g.
import tohil tcl=tohil.import_tcl() a=5.2 tcl.W(a)
will show a GiD window with the value of the variable a