GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

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

  • No labels