XMLCommand#

class src.pyconverter.xml2py.ast_tree.XMLCommand(filename, refentry, terms, docu_global, version_variables, links, fcache, meta_only=False)#

Bases: Element

Provides the XML command from the documentation.

Overview#

py_signature

Beginning of the Python command’s definition.

py_docstring

Python docstring of the command.

py_notes

Python-formatted notes string.

py_parm

Python parameter’s string.

py_source

Return the Python source.

to_python

Return the complete Python definition of the command.

xml_filename

Source filename of the command.

args

Command arguments.

default

Command default.

arg_desc

Argument object list of the command.

short_desc

Short description of the command.

name

Name of the XML command.

py_name

Python-compatible name.

py_args

is_archived

Flag indicating if the command is archived.

group

Group of the command.

url

URL to the Ansys command documentation.

filename

Command filename

notes

Notes of the command.

Import detail#

from src.pyconverter.xml2py.ast_tree import XMLCommand

Property detail#

property XMLCommand.xml_filename#

Source filename of the command.

property XMLCommand.args#

Command arguments.

property XMLCommand.default#

Command default.

property XMLCommand.arg_desc: List[Argument]#

Argument object list of the command.

property XMLCommand.short_desc#

Short description of the command.

property XMLCommand.name#

Name of the XML command.

property XMLCommand.py_name#

Python-compatible name.

property XMLCommand.py_args#
property XMLCommand.is_archived#

Flag indicating if the command is archived.

property XMLCommand.group#

Group of the command.

property XMLCommand.url#

URL to the Ansys command documentation.

property XMLCommand.filename#

Command filename

property XMLCommand.notes#

Notes of the command.

Method detail#

XMLCommand.py_signature(indent='') str#

Beginning of the Python command’s definition.

XMLCommand.py_docstring(custom_functions, max_length=100)#

Python docstring of the command.

XMLCommand.py_notes(max_length=100)#

Python-formatted notes string.

XMLCommand.__repr__()#
XMLCommand.py_parm(max_length=100, indent='', links=None, base_url=None, fcache=None)#

Python parameter’s string.

XMLCommand.py_source(custom_functions=None, indent='')#

Return the Python source.

Parameters:
custom_functions: CustomFunctions, optional

Custom functions to add to the command. The default is None.

XMLCommand.to_python(custom_functions=None, indent='')#

Return the complete Python definition of the command.

Parameters:
custom_functions: CustomFunctions, optional

Custom functions to add to the command. The default is None.

indent: str, optional

Indentation of the Python function. The default is "".

Returns:
str

Python function of the command including the converted docstring.