class documentation
Path of an OpenSMI object, e.g. /M1/Components/Gripper/SkillSet/Pick.
A tuple of segments, never normalized: a segment is exactly what was put in. () is the root /. Equal only to other ObjectPath objects, never to a str; ordering follows the segments, which gives tree order.
| Class Method | of |
Return path as is, or parsed if it is a str. |
| Class Method | parse |
Parse "/M1/Components/Gripper"; "/" is the root. |
| Static Method | escape |
Return segment as a glob pattern that matches only itself. |
| Method | __post |
Check the segments. |
| Method | __str__ |
Return the path as text, e.g. "/M1/Components/Gripper". |
| Method | __truediv__ |
Return this path extended by segment. The segment is checked, not sanitized. |
| Method | is |
Return whether this path is other or below it. |
| Method | match |
Return whether the whole path matches the glob pattern, from the root to the last segment. |
| Class Variable | segments |
Undocumented |
| Property | name |
Last segment; "" for the root. |
| Property | parent |
Path without the last segment. |
Parse "/M1/Components/Gripper"; "/" is the root.
| Raises | |
ValueError | If text doesn't start with / or has an empty segment (//, trailing /). |
Return segment as a glob pattern that matches only itself.
* becomes [*], ? becomes [?] and [ becomes [[], as glob.escape() does.
Check the segments.
| Raises | |
TypeError | If segments is no tuple of str. |
ValueError | If a segment is empty or contains /. |
Return whether the whole path matches the glob pattern, from the root to the last segment.
Per segment, *, ? and [...] work as in fnmatch (case-sensitive); a ** segment matches any number of segments, including none. Use escape() for segments taken literally.
| Raises | |
ValueError | If pattern doesn't start with / or has an empty segment. |