/
Tohil Python package

GiD - The personal pre and post processor

Tohil Python package

GiD includes a Tcl package called tohil that provides ways to exchange data and execute code between the Python and Tcl interpreters. (Tohil is included since GiD 16.1.2d developer)

The documentation of tohil is at https://flightaware.github.io/tohil-docs/

A python interpreter is included with Tohil inside GiD (GiD 17.0 has Python 3.12.3, previous developer versions had Python 3.10.5 or 3.10.8)

This is a list of some common Python modules, required by GiD Tcl plugins invoking Python (like meshio, pybaqus, meshfix):

  • numpy : efficient use of arrays

  • matplotlib : to plot graphs

  • meshio : conversion between several mesh formats

  • h5py : read/write HDF5 scientific data format

  • netCDF4 : read/write netCDF4 scientific data format

  • debugpy : debugging Python from VSCode editor in case of embedded Python interpreter

In preliminary versions these modules were included in the GiD installer, but since GiD 16.1.4d, they will installed on demand by the functions of GiD plugins that require them, and off course could be easily installed manually from the GiD Tcl command line with a command like this:

-np- GiD_Python_PipInstall {matplotlib}

Related content

Running Python as external process
Running Python as external process
More like this
Real example: meshio GiD plugin
Real example: meshio GiD plugin
More like this
Install more Python packages
Install more Python packages
More like this
Using Python in GiD
Using Python in GiD
More like this
From GiD's command line ( matplotlib example )
From GiD's command line ( matplotlib example )
More like this
Debug Python from VS Code editor
Debug Python from VS Code editor
More like this

COPYRIGHT © 2022 · GID · CIMNE