example$ regina-python
Regina 5.1
Software for low-dimensional topology
Copyright (c) 1999-2017, The Regina development team
&gt;&gt;&gt; ################################
... #
... #  Sample Python Script
... #
... #  Illustrates progress reporting during long operations.
... #
... #  See the file "progress.session" for the results of running this script.
... #
... ################################
... 
&gt;&gt;&gt; import time
&gt;&gt;&gt; 
&gt;&gt;&gt; # Create an 18-tetrahedron triangulation of a knot complement with real
... # boundary faces (not an ideal vertex).  The knot is L106003 from the
... # knot/link census.  We used Regina to truncate the ideal vertex, and
... # then copied the isomorphism signature so that we can reconstruct the
... # triangulation here.
... sig = 'sfLfvQvwwMQQQccjghjkmqlonrnrqpqrnsnksaisnrobocksks'
&gt;&gt;&gt; tri = Triangulation3(sig)
&gt;&gt;&gt; print tri.size(), 'tetrahedra'
18 tetrahedra
&gt;&gt;&gt; 
&gt;&gt;&gt; # Create a progress tracker to use during the normal surface enumeration.
... # This will report the state of progress while the enumeration runs in
... # the background.
... tracker = ProgressTracker()
&gt;&gt;&gt; 
&gt;&gt;&gt; # Start the normal surface enumeration.
... # Because we are passing a progress tracker to enumerate(), the
... # enumeration will start in the background and control will return
... # immediately to the python console.
... surfaces = NormalSurfaces.enumerate(tri, NS_STANDARD, NS_VERTEX,
...     NS_ALG_DEFAULT, tracker)
&gt;&gt;&gt; 
&gt;&gt;&gt; # At this point the enumeration is up and running.
... # Output a progress report every half-second until it finishes.
... while not tracker.isFinished():
...     print 'Progress:', tracker.percent(), '%'
...     time.sleep(0.5)
... 
Progress: 0.774536132812 %
Progress: 51.85546875 %
Progress: 89.0057373047 %
&gt;&gt;&gt; 
&gt;&gt;&gt; # The surface enumeration is now complete.
... print surfaces.size(), 'normal surfaces'
2319 normal surfaces
&gt;&gt;&gt;
