help_command#

ansys.mapdl.core.cli.help.help_command(command)#

Render the PyMAPDL docstring of a MAPDL command for a terminal.

Parameters:
commandstr

MAPDL command name to look up, including any leading / or * prefix. * and \* map to the STAR<CMD> key and / maps to SLASH<CMD>, so the prefix is significant.

Returns:
str

The docstring formatted for a colour terminal, including ANSI escape sequences. Strip them with click.strip_ansi() when writing to a plain stream.

Raises:
ModuleNotFoundError

When the rich-rst package is not installed.

ValueError

When no PyMAPDL method matches command, or when the matching method has no docstring.

Return type:

str

Examples

Get the documentation of the /PREP7 command:

>>> from ansys.mapdl.core.cli.help import help_command
>>> print(help_command("/PREP7"))