example$ regina-python
Regina 7.0
Software for low-dimensional topology
Copyright (c) 1999-2021, The Regina development team
&gt;&gt;&gt; ################################
&gt;&gt;&gt; #
&gt;&gt;&gt; #  Sample Python Script
&gt;&gt;&gt; #
&gt;&gt;&gt; #  Illustrates different queries and actions on a 3-manifold triangulation
&gt;&gt;&gt; #  and its normal surfaces.
&gt;&gt;&gt; #
&gt;&gt;&gt; #  See the file "triangulation.session" for the results of running this
&gt;&gt;&gt; #  script.
&gt;&gt;&gt; #
&gt;&gt;&gt; ################################
&gt;&gt;&gt;
&gt;&gt;&gt; # Create a new (3,4,7) layered solid torus.  This is a 3-tetrahedron
&gt;&gt;&gt; # triangulation of a solid torus.
&gt;&gt;&gt; t = Example3.lst(3, 4)
&gt;&gt;&gt; print(t)
Bounded orientable 3-D triangulation, f = ( 1 5 7 3 )
&gt;&gt;&gt;
&gt;&gt;&gt; # Print the full skeleton of the triangulation.
&gt;&gt;&gt; print(t.detail())
Size of the skeleton:
  Tetrahedra: 3
  Triangles: 7
  Edges: 5
  Vertices: 1

Tetrahedron gluing:
  Tet  |  glued to:      (012)      (013)      (023)      (123)
  -----+-------------------------------------------------------
    0  |              boundary   boundary    1 (012)    1 (130)
    1  |               0 (023)    0 (312)    2 (013)    2 (120)
    2  |               1 (312)    1 (023)    2 (312)    2 (230)

Vertices:
  Tet  |  vertex:    0   1   2   3
  -----+--------------------------
    0  |             0   0   0   0
    1  |             0   0   0   0
    2  |             0   0   0   0

Edges:
  Tet  |  edge:   01  02  03  12  13  23
  -----+--------------------------------
    0  |           0   1   2   2   1   3
    1  |           1   2   3   3   2   4
    2  |           2   4   3   3   4   3

Triangles:
  Tet  |  face:  012 013 023 123
  -----+------------------------
    0  |           0   1   2   3
    1  |           2   3   4   5
    2  |           5   4   6   6


&gt;&gt;&gt;
&gt;&gt;&gt; # Calculate some algebraic properties of the triangulation.
&gt;&gt;&gt; print(t.homology())
Z
&gt;&gt;&gt; print(t.homologyBdry())
2 Z
&gt;&gt;&gt;
&gt;&gt;&gt; # Test for 0-efficiency, which asks Regina to search for certain types
&gt;&gt;&gt; # of normal surfaces.
&gt;&gt;&gt; print(t.isZeroEfficient())
False
&gt;&gt;&gt;
&gt;&gt;&gt; # Make our own list of vertex normal surfaces in standard coordinates.
&gt;&gt;&gt; surfaces = NormalSurfaces(t, NormalCoords.Standard)
&gt;&gt;&gt;
&gt;&gt;&gt; # Print the full list of vertex normal surfaces.
&gt;&gt;&gt; print(surfaces.detail())
Embedded, vertex surfaces
Coordinates: Standard normal (tri-quad)
Number of surfaces is 9
1 1 1 1 ; 0 0 0 || 1 1 0 0 ; 1 0 0 || 0 0 0 0 ; 0 2 0
0 0 1 1 ; 1 0 0 || 1 1 1 1 ; 0 0 0 || 1 1 1 1 ; 0 0 0
0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0 || 1 1 1 1 ; 0 0 0
0 0 0 0 ; 0 0 2 || 0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0
1 1 0 0 ; 0 0 1 || 1 1 0 0 ; 0 0 0 || 0 0 0 0 ; 0 1 0
3 3 0 0 ; 0 0 1 || 1 1 0 0 ; 0 0 2 || 1 1 0 0 ; 0 0 1
0 0 1 1 ; 1 0 0 || 1 1 0 0 ; 1 0 0 || 0 0 0 0 ; 0 2 0
0 0 0 0 ; 0 1 0 || 0 0 0 0 ; 1 0 0 || 0 0 0 0 ; 0 1 0
1 1 1 1 ; 0 0 0 || 1 1 1 1 ; 0 0 0 || 1 1 1 1 ; 0 0 0

&gt;&gt;&gt;
&gt;&gt;&gt; # Print the Euler characteristic and orientability of each surface.
&gt;&gt;&gt; for s in surfaces:
...     print("Chi =", s.eulerChar(), "; Or =", s.isOrientable())
...
Chi = -1 ; Or = True
Chi = 0 ; Or = True
Chi = 0 ; Or = True
Chi = 0 ; Or = True
Chi = 0 ; Or = False
Chi = 1 ; Or = True
Chi = -2 ; Or = True
Chi = -1 ; Or = False
Chi = 1 ; Or = True
&gt;&gt;&gt;
&gt;&gt;&gt; # List all surfaces with more than one quad in the first tetrahedron.
&gt;&gt;&gt; for s in surfaces:
...     if s.quads(0,0) + s.quads(0,1) + s.quads(0,2) &gt; 1:
...         print(s)
...
0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0 || 1 1 1 1 ; 0 0 0
0 0 0 0 ; 0 0 2 || 0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0
&gt;&gt;&gt;
