There is a GIMP Procedure call, intended to be used from scripts and plug-ins, which can be called directly from the interactive prompts.
Here is an example Python session that retrieves a reference the last image open in GIMP, and applies a [2, 0, 0, 0, 2, 0, 0, 0, 1] transform to it.
You can get to the Python console in GIMP in filters->python-fu->console
GIMP 2.8.14 Python Console Python 2.7.5 (default, Jun 25 2014, 10:19:55) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] >>> img = gimp.image_list()[0] >>> img <gimp.Image '[Untitled]'> >>> matrix = [2,0,0, 0,2,0, 0,0,1] >>> more_parms = [True, TRANSFORM_RESIZE_ADJUST] >>> drawable = pdb.gimp_drawable_transform_matrix_default(img.layers[0], *(matrix + more_parms))
I could find the `gimp_drawable_transform_matrix_default procedure by clicking on the "browse" button at the bottom of the dialog with the Python session, searching for "matrix", and when I found a suitable call, clicking on "apply": that paste the function call on the Python session with mock parameters, I cared to replace.
I then took advantage of Python's "syntax sugar" to pass in sequence elements as individual parameters to a function call - that is what the "*" is for. For it to work, I had to append the 2 extra parameters (interpolation, and clip mode) to the matrix coefficients.
This is in effect the same call as
pdb.gimp_drawable_transform_matrix_default(img.layers[0], matrix[0], matrix[1], matrix[2], ...., matrix[9], True, TRANSFORM_SIZE_ADJUST)
would be.