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#
Set the notes and other parameters of the command. |
|
Beginning of the Python command’s definition. |
|
Customized notes for the command. |
|
Python docstring of the command. |
|
Python-formatted notes string. |
|
Python parameter’s string. |
|
Return the Python source. |
|
Return the complete Python definition of the command. |
Source filename of the command. |
|
Python-compatible name. |
|
Command arguments. |
|
Command default. |
|
Argument object list of the command. |
|
Short description of the command. |
|
Name of the XML command. |
|
Flag indicating if the command is archived. |
|
Group of the command. |
|
Other parameters of the command. |
|
Notes of the command. |
|
URL to the Ansys command documentation. |
|
Command filename |
Import detail#
from src.pyconverter.xml2py.ast_tree import XMLCommand
Property detail#
- property XMLCommand.xml_filename#
Source filename of the command.
- property XMLCommand.py_name#
Python-compatible name.
- property XMLCommand.args#
Command arguments.
- property XMLCommand.default#
Command default.
- property XMLCommand.short_desc#
Short description of the command.
- property XMLCommand.name#
Name of the XML command.
- property XMLCommand.py_args#
- property XMLCommand.is_archived#
Flag indicating if the command is archived.
- property XMLCommand.group#
Group of the command.
- property XMLCommand.other_parameters#
Other parameters of the command.
- property XMLCommand.notes#
Notes of the command.
- property XMLCommand.url#
URL to the Ansys command documentation.
- property XMLCommand.filename#
Command filename
Method detail#
- XMLCommand.set_notes_and_other_parameters()#
Set the notes and other parameters of the command.
- XMLCommand.py_signature(custom_functions: pyconverter.xml2py.custom_functions.CustomFunctions, indent='') str #
Beginning of the Python command’s definition.
- XMLCommand.custom_notes(custom_functions: pyconverter.xml2py.custom_functions.CustomFunctions = None, automated_notes: List[str] = None) List[str] #
Customized notes for the command.
- XMLCommand.py_docstring(custom_functions: pyconverter.xml2py.custom_functions.CustomFunctions, comment_command_dict: dict = None) str #
Python docstring of the command.
- Parameters:
- custom_functions
CustomFunctions
Custom functions object.
- comment_command_dict: dict, optional
Dictionary of commands associated to a list of comments with the following format:
{"command": [["message_type", "message"]}
. The default isNone
.
- custom_functions
- XMLCommand.py_notes(note_elem_list, section_title)#
Python-formatted notes string.
- XMLCommand.__repr__()#
- XMLCommand.py_parm(custom_functions=None, 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, comment_command_dict=None, indent='', image_folder_path: pathlib.Path = None)#
Return the complete Python definition of the command.
- Parameters:
- custom_functions: CustomFunctions, optional
Custom functions to add to the command. The default is
None
.- comment_command_dict: dict, optional
Dictionary of commands associated to a list of comments with the following format:
{"command": [["message_type", "message"]}
. The default isNone
.- indent: str, optional
Indentation of the Python function. The default is
""
.
- Returns:
str
Python function of the command including the converted docstring.