3. Command-Line Arguments and Options

In this section, the various command-line arguments and options are described.

3.1. Example

One of the most common ways of starting baspl++ from the command-line is to execute a Python script. Assume that in the current directory there is the script "view.py". The command

baspl++ view.py

will start baspl++ and execute the script "view.py".

3.2. Synopsis

baspl++ [options] [database(s)] [script [argument(s)]]

3.3. Options

  • --help: Print a summary of the command line arguments and exit.

  • --version: Print the version of the program and exit.

  • --debug: Enable debugging mode. When enabled and an error occurs, a Python traceback is shown together with the error message. This option is useful when reporting problems, as the traceback information often helps to find the cause of the problem more quickly.

  • --term: Keep the baspl++ Python console in the terminal from which baspl++ is started, instead of embedding the baspl++ Python console in the baspl++ main window.

    [Note] Note

    Whether baspl++ embeds the Python console by default or not can be configured in the preferences dialog.

  • --no-term: The opposite of the --term option: Embed baspl++ Python console in the baspl++ main window. If the preferences are unchanged, this is the default.

  • --no-scene: Do not create a default Scene object in the baspl++ main window.

  • --no-lightsource: Do not add a default LightSource object to the default Scene object in the baspl++ main window.

3.4. Arguments

  • database(s): Try to load the database(s) into Model objects. An arbitrary number of database names may be specified. The variable names for the Model objects are m, m1, m2, m3, etc.

  • script: The Python script to execute.

  • argument(s): Command-line arguments for the Python script. All command-line arguments given behind the script-argument will be given as arguments to the Python script.