Class SearchPath
source code
Class used by the recording framework (and for more verbose script
logging) for identifying nodes in a persistent way, independent of the
style of script being written.
Implemented as a list of (predicate, isRecursive) pairs, giving the
'best' way to find the Accessible wrapped by a Node, starting at the root
and applying each search in turn.
This is somewhat analagous to an absolute path in a filesystem, except
that some of searches may be recursive, rather than just searching direct
children.
FIXME: try to ensure uniqueness FIXME: need some heuristics to get
'good' searches, whatever that means
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getRelativePath(self,
other)
Given another SearchPath instance, if the other is 'below' this one,
return a SearchPath that describes how to reach it relative to this
one (a copy of the second part of the list). |
source code
|
|
|
getPrefix(self,
n)
Get the first n components of this instance as a new instance |
source code
|
|
|
|
Used by the recording system.
Generate the Python source code that will carry out this search.
|
Given another SearchPath instance, if the other is 'below' this one,
return a SearchPath that describes how to reach it relative to this one
(a copy of the second part of the list). Otherwise return None.
|