The ``launcher.py`` module ========================== .. py:module:: ansys.rocky.core.launcher Summary ------- .. py:currentmodule:: launcher .. tab-set:: .. tab-item:: Functions .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~launch_rocky` - Launch the Rocky executable with the PyRocky server enabled. * - :py:obj:`~launch_freeflow` - Launch the FreeFlow executable with the PyRocky server enabled. .. tab-item:: Constants .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~MINIMUM_ANSYS_VERSION_SUPPORTED` - * - :py:obj:`~COMPANY` - Description ----------- Module that exposes functions to launch a Rocky application session. .. !! processed by numpydoc !! Module detail ------------- .. py:function:: launch_rocky(rocky_exe: pathlib.Path | str | None = None, rocky_version: int | None = None, *, headless: bool = True, server_port: int = _PYROCKY_DEFAULT_PORT, close_existing: bool = False) -> ansys.rocky.core.client.RockyClient Launch the Rocky executable with the PyRocky server enabled. This method waits for Rocky to start up and then returns a ```RockyClient`` instance. :Parameters: **rocky_exe:** Path to the Rocky executable. **rocky_version:** Rocky version to run. If no executable is passed and the version is not specified, this method tries to find the path using the latest Ansys path returned by ansys-tools-path API. **headless:** Whether to launch Rocky in headless mode. The default is ``True``. **server_port:** Set the port for Rocky RPC server. **close_existing:** Checks if a session exists under the given server_port and closes it before attempting to launch a new session. :Returns: :obj:`RockyClient` Rocky client instance connected to the launched Rocky app. .. !! processed by numpydoc !! .. py:function:: launch_freeflow(freeflow_exe: pathlib.Path | str | None = None, freeflow_version: int | None = None, *, headless: bool = True, server_port: int = _PYROCKY_DEFAULT_PORT, close_existing: bool = False) -> ansys.rocky.core.client.RockyClient Launch the FreeFlow executable with the PyRocky server enabled. This method waits for Rocky to start up and then returns a ```RockyClient`` instance. :Parameters: **freeflow_exe:** Path to the Freeflow executable. **freeflow_version:** Freeflow version to run. If no executable is passed and the version is not specified, this method tries to find the path using the latest Ansys path returned by ansys-tools-path API. **headless:** Whether to launch Freeflow in headless mode. The default is ``True``. **server_port:** Set the port for Rocky RPC server. **close_existing:** Checks if a session exists under the given server_port and closes it before attempting to launch a new session. :Returns: :obj:`RockyClient` Rocky client instance connected to the launched Rocky/Freeflow app. .. !! processed by numpydoc !! .. py:data:: MINIMUM_ANSYS_VERSION_SUPPORTED :value: 242 .. py:data:: COMPANY :value: 'Ansys'