Namespaces | |
cli | |
color | |
xmlutils | |
Classes | |
class | Macro |
class | MacroNameSpace |
class | NameSpace |
class | PropertyNameSpace |
class | QuickLexer |
class | Table |
class | XacroException |
class | YamlDictWrapper |
class | YamlListWrapper |
Functions | |
def | abs_filename_spec (filename_spec) |
def | check_attrs (tag, required, optional) |
def | check_deprecated_tag (tag_name) |
def | construct_angle_degrees (loader, node) |
def | construct_angle_radians (loader, node) |
def | create_global_symbols () |
def | deprecated_tag (tag_name=None, _issued=[False]) |
def | eval_extension (s) |
def | get_include_files (filename_spec, symbols) |
def | grab_macro (elt, macros) |
def | grab_macros (elt, macros) |
def | grab_properties (elt, table) |
def | grab_property (elt, table) |
def | import_xml_namespaces (parent, attributes) |
def | init_stacks (file) |
def | is_include (elt) |
def | is_valid_name (name) |
def | load_yaml (filename) |
def | parse_macro_arg (s) |
def | process_include (elt, macros, symbols, func) |
def | process_includes (elt, macros=None, symbols=None) |
def | safe_eval (expr, globals, locals=None) |
def | tokenize (s, sep=', skip_empty=True) |
Variables | |
_basestr = basestring | |
list | all_includes = [] |
bool | allow_non_prefixed_tags = True |
backup_path = list(sys.path) | |
cur_dir = os.getcwd() | |
string | default_value = '''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|''' |
bool | do_check_order = False |
dictionary | encoding = {'encoding': 'utf-8'} |
filestack = None | |
string | include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files.""" |
macrostack = None | |
path | |
re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + ')(?:\s+|$)(.*)') | |
dictionary | substitution_args_context = {} |
this_dir = os.path.dirname(__file__) | |
this_dir_cwd = os.getcwd() | |
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 74 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 267 of file __init__.py.
def xacro.check_deprecated_tag | ( | tag_name | ) |
Check whether tagName starts with xacro prefix. If not, issue a warning. :param tag_name: :return: True if tagName is accepted as xacro tag False if tagName doesn't start with xacro prefix, but the prefix is required
Definition at line 304 of file __init__.py.
def xacro.construct_angle_degrees | ( | loader, | |
node | |||
) |
utility function for converting degrees into radians from yaml
Definition at line 127 of file __init__.py.
def xacro.construct_angle_radians | ( | loader, | |
node | |||
) |
utility function to construct radian values from yaml
Definition at line 118 of file __init__.py.
def xacro.create_global_symbols | ( | ) |
Definition at line 164 of file __init__.py.
def xacro.deprecated_tag | ( | tag_name = None , |
|
_issued = [False] |
|||
) |
Definition at line 287 of file __init__.py.
def xacro.eval_extension | ( | s | ) |
Definition at line 327 of file __init__.py.
def xacro.get_include_files | ( | filename_spec, | |
symbols | |||
) |
Definition at line 532 of file __init__.py.
def xacro.grab_macro | ( | elt, | |
macros | |||
) |
Definition at line 667 of file __init__.py.
def xacro.grab_macros | ( | elt, | |
macros | |||
) |
Definition at line 700 of file __init__.py.
def xacro.grab_properties | ( | elt, | |
table | |||
) |
Definition at line 775 of file __init__.py.
def xacro.grab_property | ( | elt, | |
table | |||
) |
Definition at line 713 of file __init__.py.
def xacro.import_xml_namespaces | ( | parent, | |
attributes | |||
) |
import all namespace declarations into parent
Definition at line 556 of file __init__.py.
def xacro.init_stacks | ( | file | ) |
Definition at line 67 of file __init__.py.
def xacro.is_include | ( | elt | ) |
Definition at line 510 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 620 of file __init__.py.
def xacro.load_yaml | ( | filename | ) |
Definition at line 132 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 644 of file __init__.py.
def xacro.process_include | ( | elt, | |
macros, | |||
symbols, | |||
func | |||
) |
Definition at line 570 of file __init__.py.
def xacro.process_includes | ( | elt, | |
macros = None , |
|||
symbols = None |
|||
) |
Definition at line 608 of file __init__.py.
def xacro.safe_eval | ( | expr, | |
globals, | |||
locals = None |
|||
) |
Definition at line 237 of file __init__.py.
def xacro.tokenize | ( | s, | |
sep = ' , |
|||
skip_empty = True |
|||
) |
Definition at line 152 of file __init__.py.
|
private |
Definition at line 51 of file __init__.py.
list xacro.all_includes = [] |
Definition at line 506 of file __init__.py.
bool xacro.allow_non_prefixed_tags = True |
Definition at line 301 of file __init__.py.
string xacro.default_value = '''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|''' |
Definition at line 639 of file __init__.py.
bool xacro.do_check_order = False |
Definition at line 342 of file __init__.py.
dictionary xacro.encoding = {'encoding': 'utf-8'} |
Definition at line 52 of file __init__.py.
xacro.filestack = None |
Definition at line 63 of file __init__.py.
string xacro.include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files.""" |
Definition at line 507 of file __init__.py.
xacro.macrostack = None |
Definition at line 64 of file __init__.py.
xacro.re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + ')(?:\s+|$)(.*)') |
Definition at line 640 of file __init__.py.
dictionary xacro.substitution_args_context = {} |
Definition at line 59 of file __init__.py.
xacro.unicode = str |
Definition at line 55 of file __init__.py.
int xacro.verbosity = 1 |
Definition at line 264 of file __init__.py.