Utility functions for GAP¶
- exception sage.libs.gap.util.GAPError[source]¶
Bases:
ValueErrorExceptions raised by the GAP library
- class sage.libs.gap.util.ObjWrapper[source]¶
Bases:
objectWrapper for GAP master pointers.
EXAMPLES:
sage: from sage.libs.gap.util import ObjWrapper sage: x = ObjWrapper() sage: y = ObjWrapper() sage: x == y True
>>> from sage.all import * >>> from sage.libs.gap.util import ObjWrapper >>> x = ObjWrapper() >>> y = ObjWrapper() >>> x == y True
- sage.libs.gap.util.get_owned_objects()[source]¶
Helper to access the refcount dictionary from Python code
- sage.libs.gap.util.kernel_info()[source]¶
Return the GAP version, architecture, and root paths in a tuple.
The first two are used as cache keys to invalidate old workspaces in
sage.interfaces.gap_workspace.gap_workspace_file. The root paths are required to initialize libgap. In the past we computed the root paths at build-time, but that may not work if (say) the build and target hosts have different libdirs.This is fast enough that it should suffice until a more reliable method is available (GAP Github issue 6252).
OUTPUT:
A tuple containing three strings:
The GAP version
The GAP architecture
A semicolon-delimited list of GAP’s RootPaths