Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You should be able to do the following:

sage: gap.Read('"gap_defs.g"') #similarly gap.eval('Read("gap_defs.g");')
sage: X = gap.customFunction() #assuming customFunction() returns an object

If that isn't working for you, you'll have to be more specific as to what the error is.

Note that doing

sage: gap('Read("gap_defs.g");')

is equivalent to doing something like

sage24 := Read("gap_defs.g");

in GAP. If you want to just evaluate a command in the session, use gap.eval('XXX').