Namespaces | |
cli | |
color | |
xmlutils | |
Classes | |
class | ConstructUnits |
class | Macro |
class | NameSpace |
class | QuickLexer |
class | Table |
class | XacroException |
class | YamlDictWrapper |
class | YamlListWrapper |
Functions | |
def | abs_filename_spec (filename_spec) |
def | check_attrs (tag, required, optional) |
def | create_global_symbols () |
def | eval_extension (s) |
def | get_include_files (filename_spec, symbols) |
def | grab_macro (elt, macros) |
def | grab_property (elt, table) |
def | import_xml_namespaces (parent, attributes) |
def | init_stacks (file) |
def | is_valid_name (name) |
def | load_yaml (filename) |
def | parse_macro_arg (s) |
def | process_include (elt, macros, symbols, func) |
def | safe_eval (expr, globals, locals=None) |
def | tokenize (s, sep=',;', skip_empty=True) |
Variables | |
_basestr = basestring | |
list | all_includes = [] |
string | default_value = r'''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|''' |
dictionary | encoding = {'encoding': 'utf-8'} |
filestack = None | |
string | include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files.""" |
macrostack = None | |
re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + r')(?:\s+|$)(.*)') | |
dictionary | substitution_args_context = {} |
unicode = str | |
int | verbosity = 1 |
def xacro.abs_filename_spec | ( | filename_spec | ) |
Prepend the dirname of the currently processed file if filename_spec is not yet absolute
Definition at line 76 of file __init__.py.
def xacro.check_attrs | ( | tag, | |
required, | |||
optional | |||
) |
Helper routine to fetch required and optional attributes and complain about any additional attributes. :param tag (xml.dom.Element): DOM element node :param required [str]: list of required attributes :param optional [str]: list of optional attributes
Definition at line 276 of file __init__.py.
def xacro.create_global_symbols | ( | ) |
Definition at line 173 of file __init__.py.
def xacro.eval_extension | ( | s | ) |
Definition at line 303 of file __init__.py.
def xacro.get_include_files | ( | filename_spec, | |
symbols | |||
) |
Definition at line 476 of file __init__.py.
def xacro.grab_macro | ( | elt, | |
macros | |||
) |
Definition at line 606 of file __init__.py.
def xacro.grab_property | ( | elt, | |
table | |||
) |
Definition at line 638 of file __init__.py.
def xacro.import_xml_namespaces | ( | parent, | |
attributes | |||
) |
import all namespace declarations into parent
Definition at line 500 of file __init__.py.
def xacro.init_stacks | ( | file | ) |
Definition at line 69 of file __init__.py.
def xacro.is_valid_name | ( | name | ) |
Checks whether name is a valid property or macro identifier. With python-based evaluation, we need to avoid name clashes with python keywords.
Definition at line 559 of file __init__.py.
def xacro.load_yaml | ( | filename | ) |
Definition at line 141 of file __init__.py.
def xacro.parse_macro_arg | ( | s | ) |
parse the first param spec from a macro parameter string s accepting the following syntax: <param>[:=|=][^|]<default> :param s: param spec string :return: param, (forward, default), rest-of-string forward will be either param or None (depending on whether ^ was specified) default will be the default string or None If there is no default spec at all, the middle pair will be replaced by None
Definition at line 583 of file __init__.py.
def xacro.process_include | ( | elt, | |
macros, | |||
symbols, | |||
func | |||
) |
Definition at line 514 of file __init__.py.
def xacro.safe_eval | ( | expr, | |
globals, | |||
locals = None |
|||
) |
Definition at line 246 of file __init__.py.
def xacro.tokenize | ( | s, | |
sep = ',; ' , |
|||
skip_empty = True |
|||
) |
Definition at line 161 of file __init__.py.
|
private |
Definition at line 53 of file __init__.py.
list xacro.all_includes = [] |
Definition at line 472 of file __init__.py.
string xacro.default_value = r'''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|''' |
Definition at line 578 of file __init__.py.
dictionary xacro.encoding = {'encoding': 'utf-8'} |
Definition at line 54 of file __init__.py.
xacro.filestack = None |
Definition at line 65 of file __init__.py.
string xacro.include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files.""" |
Definition at line 473 of file __init__.py.
xacro.macrostack = None |
Definition at line 66 of file __init__.py.
xacro.re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + r')(?:\s+|$)(.*)') |
Definition at line 579 of file __init__.py.
dictionary xacro.substitution_args_context = {} |
Definition at line 61 of file __init__.py.
xacro.unicode = str |
Definition at line 57 of file __init__.py.
int xacro.verbosity = 1 |
Definition at line 273 of file __init__.py.