Note
Go to the end to download the full example code
Configure the launcher from the command line#
This example shows how to configure the example_httpserver
plugin from the command line.
It consists mostly of command-line interactions. With the exception of interactive commands,
this example can be run when downloaded as a Jupyter notebook. The interactive commands and
their outputs are simply shown as text.
The configuration contains only a single value, directory
, which specifies the
where the HTTP server is to serve files from.
To see the list of launch modes for the example_httpserver
product, run
this code:
%%bash
ansys-launcher configure example_httpserver
Here is the output:
Usage: ansys-launcher configure example_httpserver [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
direct
Interactive configuration#
To interactively specify the available configuration options, run this command:
ansys-launcher configure example_httpserver direct
The preceding command might result in a session like this:
directory:
[<current-working-directory>]: /path/to/directory
Updated /home/<your_username>/.config/ansys_tools_local_product_launcher/config.json
Non-interactive configuration#
Alternatively, you can specify the configuration fully from the command line (non-interactively):
%%bash
ansys-launcher configure example_httpserver direct --directory /path/to/directory
Total running time of the script: (0 minutes 0.000 seconds)