REGINA-PYTHON(1)

πŸ“¦
version 7.4.1 Β· 3 versions
, in arch rolling, ubuntu resolute, ubuntu stonking

πŸ’– REGINA-PYTHON(1) β€” the manual, but make it make sense πŸ’–

okay bestie, so this is the regina-python man page from The Regina Handbook, section 1. it's the command-line Python interface for Regina, and honestly? she's serving.


✨ NAME ✨

regina-python β€” Regina's command-line Python interface. that's it, that's the girl. πŸŽ€


🌸 SYNOPSIS 🌸

regina-python [ -q, --quiet | -v, --verbose ] [ -n, --nolibs ] [ -a, --noautoimport ]
regina-python [ -q, --quiet | -v, --verbose ] [ -n, --nolibs ] [ -a, --noautoimport ] [ -i, --interactive ] script [ script-args ]

two whole moods. either you're just vibing in a session, or you're handing her a script to run. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so Regina is a software package for studying 3-manifold triangulations and normal surfaces. but that's not all she does β€” other key features include angle structures, census enumeration, combinatorial recognition of triangulations, and high-level tasks like 3-sphere recognition and connected sum decomposition. she also comes with a full graphical user interface, plus Python bindings and a low-level C++ programming interface. multi-talented queen. πŸ‘‘

this command starts an interactive Python session for Regina. and no, it's not the pretty GUI kind β€” it's a command-line Python session, direct text input/output, no graphical user interface, just you and the terminal, iykyk.

all of the objects, classes and methods from Regina's mathematical engine get made available through the module regina, which gets imported on startup (effectively running import regina). and on top of that, unless you pass --noautoimport, all of Regina's objects, classes and methods get imported directly into the current namespace (effectively running from regina import *). so like, everything's just there. periodt.

but wait, you don't have to do the interactive thing. instead of starting an interactive Python session, you can pass a Python script (with arguments if you want). in that case Regina will run the script β€” after first importing the regina module, obviously. and if you pass --interactive, Regina will leave you at a Python prompt once the script finishes. otherwise it exits Python and returns you to the command line. no notes. ✨


πŸ’… OPTIONS πŸ’…

  • -q, --quiet β€” start in quiet mode. no output will be produced except for serious errors. in particular, warnings get suppressed. this is equivalent to setting the environment variable REGINA_VERBOSITY=0. (shhh 🀫)
  • -v, --verbose β€” start in verbose mode. additional diagnostic information will be output. this is equivalent to setting the environment variable REGINA_VERBOSITY=2. (she's yapping and we love that for her πŸ—£οΈ)
  • -a, --noautoimport β€” still import the regina module, but do not automatically import all of Regina's objects, classes and methods into the current namespace (that is, do not run from regina import *). this means that (for example) the main 3-manifold triangulation class must be accessed as regina.Triangulation3, not just Triangulation3. lowkey more typing, highkey more explicit. 🫢
  • -i, --interactive β€” run the script in interactive mode. after executing the given script, Regina will leave you in the Python interpreter so you can run your own additional commands. this option is only available when a script is passed. if no script is passed, regina-python will always start in interactive mode. so like, it's giving redundant-but-make-it-clear. πŸ’–
bestie reminder: -n / --nolibs shows up in the synopsis up there ⬆️ but she does not get her own entry in this list. keep that in mind, don't @ me.

🌈 ENVIRONMENT VARIABLES 🌈

the following environment variables influence the behaviour of this program. most variables can also be set in the local configuration file ~/.regina-python using a line of the form option=value; exceptions are noted below. and important: environment variables take precedence over values in the configuration file. the env vars are the main character here. πŸ‘‘

  • REGINA_VERBOSITY β€” specifies how much output should be generated. recognised values are:
    • 0 β€” display errors only; this is equivalent to passing the option --quiet.
    • 1 β€” display errors and warnings; this is the default.
    • 2 β€” display errors, warnings and diagnostic output; this is equivalent to passing the option --verbose.
  • REGINA_PYTHON β€” the command used to start the Python interpreter. in general you should use the same version of Python that Regina was built against; otherwise Python might not be able to load the regina module. 😭 normally you should not need to set this option yourself. by default, Regina will use the same Python installation that it was built against.
  • REGINA_PYLIBDIR β€” the directory containing the Python module regina. if you have installed Regina's Python module in a standard Python location (i.e., Python can import it directly without extending sys.path), then REGINA_PYLIBDIR should be left empty or undefined. normally you should not need to set this option yourself. this program should know how to find Regina's Python module in standard situations, which include fixed filesystem installations (e.g., GNU/Linux and Windows), relocatable app bundles (e.g., macOS), and running directly from the source tree. she's self-sufficient like that. πŸ’…
  • REGINA_HOME β€” the directory beneath which Regina's data files are installed. in particular, Regina's census lookup routines will look for the census databases in the subdirectory $REGINA_HOME/data/census/.
⚠️ this option can only be set from the environment: it cannot be set in the configuration file ~/.regina-python.

normally you should not need to set this option yourself. this program should know how to find its data files in standard situations, which include fixed filesystem installations (e.g., GNU/Linux and Windows), relocatable app bundles (e.g., macOS), and running directly from the source tree. πŸ“


πŸ“ MACOS USERS πŸ“

if you downloaded a drag-and-drop app bundle, this utility is shipped inside it. and if you dragged Regina to the main Applications folder, you can run it as /Applications/Regina.app/Contents/MacOS/regina-python. cute, tucked away, living inside the bundle. πŸŽ€


πŸ™ˆ WINDOWS USERS πŸ™ˆ

the command regina-python is not available under Windows. however, you can still use Python scripting in Regina's graphical user interface, by opening a graphical Python console or using script packets. different platform, same energy. πŸ¦‹


⭐ SEE ALSO ⭐

  • regina-gui.

Regina comes with thorough API documentation, which describes in detail all of the objects, classes and methods that Regina makes available to Python. you can access this documentation via Help->Python API Reference in the graphical user interface, or read it online at http://regina-normal.github.io/engine-docs/. go read it, bestie, it's giving textbook but in a fun way. πŸ“šβœ¨


πŸ‘‘ AUTHOR πŸ‘‘

many people have been involved in the development of Regina; see the users' handbook for a full list of credits. it takes a village, fr fr. 🫢


and that's the whole page!! πŸ’– this came from The Regina Handbook, and it's dated 25 August 2025. slay, bye, go triangulate something. πŸŽ€βœ¨πŸ’…
πŸ“¦ where this page comes from