Classes | |
| class | ArgException |
| class | SubstitutionException |
Functions | |
| def | _arg (resolved, a, args, context) |
| def | _collect_args (arg_str) |
| def | _resolve_args (arg_str, context, resolve_anon, commands) |
| def | _sanitize_path (path) |
| def | _separate_first_path (value) |
| def | _split_command (resolved, command_with_args) |
| def | resolve_args (arg_str, context=None, resolve_anon=True) |
Variables | |
| int | _DOLLAR = 1 |
| int | _IN = 3 |
| int | _LP = 2 |
| int | _OUT = 0 |
|
private |
process $(arg) arg :returns: updated resolved argument, ``str`` :raises: :exc:`ArgException` If arg invalidly specified
Definition at line 80 of file substitution_args.py.
|
private |
State-machine parser for resolve_args. Substitution args are of the form: $(find package_name)/scripts/foo.py $(export some/attribute blar) non-relevant stuff @param arg_str: argument string to parse args from @type arg_str: str @raise SubstitutionException: if args are invalidly specified @return: list of arguments @rtype: [str]
Definition at line 159 of file substitution_args.py.
|
private |
Definition at line 142 of file substitution_args.py.
|
private |
Definition at line 74 of file substitution_args.py.
|
private |
Definition at line 65 of file substitution_args.py.
|
private |
Definition at line 58 of file substitution_args.py.
Resolves substitution args (see wiki spec U{http://ros.org/wiki/roslaunch}).
@param arg_str: string to resolve zero or more substitution args
in. arg_str may be None, in which case resolve_args will
return None
@type arg_str: str
@param context dict: (optional) dictionary for storing results of
the 'anon' and 'arg' substitution args. multiple calls to
resolve_args should use the same context so that 'anon'
substitions resolve consistently. If no context is provided, a
new one will be created for each call. Values for the 'arg'
context should be stored as a dictionary in the 'arg' key.
@type context: dict
@param resolve_anon bool: If True (default), will resolve $(anon
foo). If false, will leave these args as-is.
@type resolve_anon: bool
@return str: arg_str with substitution args resolved
@rtype: str
@raise SubstitutionException: if there is an error resolving substitution args
Definition at line 104 of file substitution_args.py.
|
private |
Definition at line 156 of file substitution_args.py.
|
private |
Definition at line 158 of file substitution_args.py.
|
private |
Definition at line 157 of file substitution_args.py.
|
private |
Definition at line 155 of file substitution_args.py.