sourCEntral - mobile manpages

pdf

REGINA-PYTHON

NAME

regina-python − Regina command-line Python interface

SYNOPSIS

regina-python [ -q, --quiet | -v, --verbose ] [ -n, --nolibs ]

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

DESCRIPTION

Regina is a topological calculator with a bent towards normal surface theory. It allows 3-manifolds to be created and manipulated and their properties of interest to be determined.

This command starts an interactive Python session for Regina. 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 the Regina calculation engine will be made available to the user in the module regina, which will be imported on startup.

Before the session begins, a number of libraries may be loaded. Libraries are simply files containing Python code to be run at the beginning of each Python session. The list of libraries to load will be read from the text file ~/.regina-libs, which should contain one library filename per line. Blank lines and lines beginning with a hash (#) will be ignored. Note that the list of currently active libraries can also be configured through the KDE user interface on the Python options page.

Instead of starting an interactive Python session, a python script can be passed (with arguments if desired). In this case the script will be run, again with the regina module imported and libraries loaded beforehand. Once the script has finished the user will be returned to the command-line, i.e., there will be no subsequent Python interaction (this behaviour can be changed by passing --interactive).

Note that regina-python may be run directly out of its source tree without being properly installed. Default locations for various Regina components will be transparently modified to look inside the source tree.

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.

-n

--nolibs

Do not load any user libraries. This refers to the libraries specified in ~/.regina-libs and/or configured through the KDE user interface, as described in the overview above.

-i

--interactive

Run the script in interactive mode. The given script will be executed, and then the user will be left in the Python interpreter to run their own additonal 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. Each of these variables can also be set in the local configuration file ~/.regina-python using a line of the form option=value. Environment variables will take precedence over values read from this 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. If the command python can be found on the path then this option defaults to the full path of that command (such as /usr/bin/python).

Note that this must be the same version of Python that Regina was compiled against. Otherwise the regina module will be unable to be loaded.

REGINA_HOME

The directory in which Regina data files are installed. This should be the directory containing the scripts/ subdirectory, the icons/ subdirectory and so on.

If Regina is being run directly out of the source tree, this defaults to the top-level source directory. If Regina is being run from a proper installation, this defaults to the corresponding installation directory.

In normal situations you should never need to set this option yourself.

Warning: When running from a proper installation, the default REGINA_HOME is actually hard-wired into the startup script (it is derived at compile-time from the options passed to ./configure). This means that if Regina is installed into one directory using make install and then moved to another directory by hand, the default REGINA_HOME will be incorrect.

REGINA_PYLIBDIR

The directory containing the Python module regina.so.

If Regina is being run directly out of the source tree, this defaults to a directory within this source tree. If Regina is being run from a proper installation, this defaults to the corresponding installation directory.

In normal situations you should never need to set this option yourself.

Warning: Like REGINA_HOME, when running from a proper installation the default REGINA_PYLIBDIR is hard-wired into the startup script. This means that if Regina is installed into one directory using make install and then moved to another directory by hand, the default REGINA_PYLIBDIR will be incorrect.

SEE ALSO

regina-kde.

The calculation engine documentation should also be installed, describing in detail all of the Regina objects, classes and methods that are available. This is generally installed in /usr/share/regina/engine-docs/ or /usr/local/share/regina/engine-docs/, though your distribution may differ.

AUTHOR

Regina was written by Ben Burton <bab AT debian DOT org> with help from others; see the documentation for full details.

pdf