# Command Line: Main Applications

This reference chapter documents the command-line options for ®ina;'s two main applications: `regina-gui` and `regina-python`.

®ina; also ship with several other specialised command-line utilities, which are documented in subsequent chapters. Some are for mathematical and logistical tasks, and some are to help with compiling and linking your own programs against ®ina;.

regina-gui

1

regina-gui

®ina;'s graphical user interface

        regina-gui
        file

### Description

®abstract;

This starts the full graphical user interface, and is the usual way of starting ®ina;. Any files passed on the command-line will be opened on startup.

### Environment Variables

The following environment variables influence the behaviour of this program.

`REGINA_PYLIBDIR`

- The directory containing the &python; module `regina`.

  If you have installed ®ina;'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 ®ina;'s &python; module in standard situations, which include fixed filesystem installations (e.g., &linux; and &windows;), relocatable app bundles (e.g., &macosx;), and running directly from the source tree.

`REGINA_HOME`

- The directory beneath which ®ina;'s data files are installed. These include (amongst other things) example files in ``$REGINA_HOME`/examples/`, &api; documentation in ``$REGINA_HOME`/engine-docs/`, and census databases in ``$REGINA_HOME`/data/census/`.

  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., &linux; and &windows;), relocatable app bundles (e.g., &macosx;), and running directly from the source tree.

### &macosx; Users

If you downloaded a drag-and-drop app bundle, this is the program that runs when you open it. The executable itself is simply called `Regina`, not `regina-gui`.

### See Also

regina-python.

®ina; comes with a rich users' handbook, which you can access via &menuhandbook; in the menu. You can also read the users' handbook online at ®manhandbookurl;.

### Author

&manpageack;

regina-python

1

regina-python

®ina;'s command-line &python; interface

        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

### Description

®abstract;

This command starts an interactive &python; session for ®ina;. This will be a command-line &python; session, with direct text input/output and no graphical user interface. All of the objects, clases and methods from ®ina;'s mathematical engine will be made available through the module `regina`, which will be imported on startup (effectively running `import regina`). Moreover, unless the option `--noautoimport` is passed, all of ®ina;'s objects, classes and methods will be imported directly into the current namespace (effectively running `from regina import *`).

Instead of starting an interactive &python; session, you can pass a &python; script (with arguments if desired). In this case ®ina; will run the script (after first importing the `regina` module). If you pass `--interactive`, ®ina; will leave you at a &python; prompt once the script finishes; otherwise it will exit &python; and return you to the command line.

### Options

`-q`

`--quiet`

- Start in quiet mode. No output will be produced except for serious errors. In particular, warnings will be suppressed.

  This is equivalent to setting the environment variable `REGINA_VERBOSITY`=`0`.

`-v`

`--verbose`

- Start in verbose mode. Additional diagnostic information will be output.

  This is equivalent to setting the environment variable `REGINA_VERBOSITY`=`2`.

`-a`

`--noautoimport`

- Still import the `regina` module, but do not automatically import all of ®ina;'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`.

`-i`

`--interactive`

- Run the script in interactive mode. After executing the given script, ®ina; will leave you in the &python; interpreter to 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.

### 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. Environment variables take precedence over values in the configuration file.

`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 ®ina; 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, ®ina; will use the same &python; installation that it was built against.

`REGINA_PYLIBDIR`

- The directory containing the &python; module `regina`.

  If you have installed ®ina;'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 ®ina;'s &python; module in standard situations, which include fixed filesystem installations (e.g., &linux; and &windows;), relocatable app bundles (e.g., &macosx;), and running directly from the source tree.

`REGINA_HOME`

- The directory beneath which ®ina;'s data files are installed. In particular, ®ina;'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., &linux; and &windows;), relocatable app bundles (e.g., &macosx;), and running directly from the source tree.

### &macosx; Users

If you downloaded a drag-and-drop app bundle, this utility is shipped inside it. If you dragged ®ina; to the main Applications folder, you can run it as `/Applications/Regina.app/Contents/MacOS/regina-python`.

### &windows; Users

The command `regina-python` is not available under &windows;. However, you can still use &python; scripting in ®ina;'s graphical user interface, by opening a graphical &python; console or using script packets.

### See Also

regina-gui.

®ina; comes with thorough &api; documentation, which describes in detail all of the objects, classes and methods that ®ina; makes available to &python;. You can access this documentation via &menuapidocs; in the graphical user interface, or read it online at ®manapiurl;.

### Author

&manpageack;