Command#

class src.pyconverter.xml2py.ast_tree.Command(element, parse_children=True)#

Bases: Element

Provides the command element.

Overview#

to_rst

Return a string to enable converting the element to an RST format.

command

Name of the command.

tail_no_args

Tail of the element after removing all its arguments.

has_args

Return whether the element has arguments.

args

Any terms immediately following the command.

py_args

String containing the arguments of the element.

py_cmd

Pythonic name of the command.

sphinx_cmd

String to refer to the Python command with Sphinx.

Import detail#

from src.pyconverter.xml2py.ast_tree import Command

Property detail#

property Command.command#

Name of the command.

property Command.tail_no_args#

Tail of the element after removing all its arguments.

property Command.has_args#

Return whether the element has arguments.

property Command.args#

Any terms immediately following the command.

property Command.py_args#

String containing the arguments of the element.

property Command.py_cmd#

Pythonic name of the command.

property Command.sphinx_cmd#

String to refer to the Python command with Sphinx.

Method detail#

Command.__repr__()#
Command.to_rst(indent='', max_length=100)#

Return a string to enable converting the element to an RST format.